[boost] function creation in MPL : "check_type"

2003-01-27 Thread Derek Ross
Hello, Would there be a way to use the MPL so that I could avoid #define'ed macros for creating these functions? The purpose of these functions is to ensure that the type of 'value' is in line with the type as specified by the string 'str'. For example, if 'value' is an int, then 'str' should be

[boost] Re: How to do this in with boost -- assert(typeid(T)==typeid(bool))

2003-01-09 Thread Derek Ross
Daniel Frey wrote: Uhm... don't know about MPL, but isn't this a good example for type_traits? Something like: template bool SetOption(COptionInfo& o, const char* key, const T& value) { BOOST_STATIC_ASSERT( boost::is_same< T, bool >::value || boost::is_same<

[boost] How to do this in with boost -- assert(typeid(T)==typeid(bool) )

2003-01-09 Thread Derek Ross
+ solution too. Thanks, Derek Ross. ___ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost