Converting a function's parameter - signature from using an `std::function<T>` to a template parameter type
问题 In my existing codebase, I have a non-template class and its constructor has the following declaration signature... struct SomeStruct { double a_; double b_; SomeStruct(double a, double b) : a_{a}, b_{b} {} } class SomeClass { private: SomeStruct fields_; size_t n_; std::function<double(double)> func_; public: SomeClass(SomeStruct fields, size_t n, std::function<double(double)> func) : fields_{fields}, n_{n}, func_{func} {} }; I was using it like this: constexpr double funcA(double x) {