Inar p
asked on
Template function instantiation with type boost::any
Hi,
I'm trying to create a map of <string, pointer to a function> where the functions signature may vary (all of them return int, bu may take arguments of different types). All the functions are template functions.
I'm using a multimap of <string, std::function<int(boost::a ny*)>*>, but when I'm trying to instantiate a function with type boost::any i'm getting a compilation error.
I wonder if there is any neat solution or bypass.
Thanks.
I'm trying to create a map of <string, pointer to a function> where the functions signature may vary (all of them return int, bu may take arguments of different types). All the functions are template functions.
I'm using a multimap of <string, std::function<int(boost::a
I wonder if there is any neat solution or bypass.
Thanks.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
2. post the compilation error
3. compiler [ Visual studio(vlc.exe) or g++ or aCC or xlC or CC or tcc.exe or g++.exe]