Here's a Function implementation from Bjarne's book
typedef double Fct(double);
Function::Function(Fct f, double r1, double r2, Point xy, int count, double xscale, double yscale)
and here's the code creating Function e
Function e{[n](double x) {return expcalc(x,n);},rmin,rmax,orig,200,xscale,yscale };
The line above gives the following error when compiling:
No instance of constructor Function::Function matches the argument list.
Note 1: this function is used to calculate exp(x) using Taylor series
Note 2: the code compiles if I remove n from lambda's square brackets
Note 3: Bjarne's used the exact same implementation in his book, not sure why it's not working here
Note 4: I'm using MVS19 community version