19 May
2014
19 May
'14
6:32 p.m.
On Mon, May 19, 2014 at 6:58 AM, Adam Wulkiewicz
Thanks for the suggestion! I also like the idea of a macro which could be put anywhere and only take types as parameters. There are some problems with the above example but this gave me an idea. The types could be passed as a parenthized list:
BOOST_IGNORE_UNUSED_TYPEDEF_WARNING((T1, T2, T3));
then internally used e.g. to build some function type or just passed to the BOOST_MPL_ASSERT_MSG as the last parameter.
There is a subtle problem with this -- you can't necessarily guarantee that forming a function type is valid. For instance, if one of your typedefs is a void type, forming a function type with it as a parameter will fail. -- -Matt Calabrese