Skip to content
Snippets Groups Projects
Commit fac7b319 authored by Jan Trávníček's avatar Jan Trávníček
Browse files

allow templated algorithms in cli

parent dc65d4b1
No related branches found
No related tags found
1 merge request!78Merge jt
......@@ -190,7 +190,8 @@ public:
template < class Algo, class ReturnType, class ... ParamTypes >
static void registerAlgorithm ( ReturnType ( * callback ) ( ParamTypes ... ), AlgorithmCategories::AlgorithmCategory category, std::array < std::string, sizeof ... ( ParamTypes ) > paramNames ) {
std::string algorithm = ext::to_string < Algo > ( );
ext::vector < std::string > templateParams;
ext::vector < std::string > templateParams = ext::get_template_info ( algorithm );
algorithm = ext::erase_template_info ( algorithm );
 
registerInternal ( std::move ( algorithm ), std::move ( templateParams ), std::make_shared < EntryImpl < ReturnType, ParamTypes ... > > ( category, std::move ( paramNames ), callback ) );
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment