我一直在研究一个框架来帮助函数模板实例化。我有一堆函数,出于优化目的由整数值模板化,需要在运行时实例化和选择。用法示例如下://Functiontoinstantiatetemplatesof.templatevoidMyFunction(float,double){};//Listofvaluestosubstituteintoeachtemplateparameter.typedefmpl::vector_cvaluesToInstantiate;intnumberOfValuesPerParameter=size::type::value;//Functionpointertyp