[mpl] Safe to instantiate mpl classes for tag-dispatch-by-instance?
9 Aug
2011
9 Aug
'11
6:50 p.m.
Hi all, Say I have a functor which accepts a tag instance: struct tagA {}; struct tagB {}; struct MyFunc { template <typename TTag> void operator()(TTag, int other_stuff) {...} }; In some cases I want to pass multiple tags at once. Is it safe to just instantiate mpl::pair, mpl::vector, etc. and use them for this purpose, since from a runtime perspective they're just empty classes? Or, is this a Bad Idea for some reason? Thanks, -Gabe
4845
Age (days ago)
4845
Last active (days ago)
0 comments
1 participants
participants (1)
-
Gabriel Redner