Link to home
Start Free TrialLog in
Avatar of Inar p
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::any*)>*>, 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.
Avatar of MURUGESAN N
MURUGESAN N
Flag of India image

1. post the implemented code
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]
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members 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.