
12 Apr
2005
12 Apr
'05
6:42 p.m.
Stephen Gross wrote:
Hi all... I know this is a simple question, but I can't figure out which boost function to use. How do I find out if two types are the same type?
For example:
template<C1, C2> void compare() { if(boost::types_are_the_same<C1, C2>::result == true) ... }
Almost. Use boost::is_same<C1,C2>::value See http://www.boost.org/libs/type_traits/index.html#relationships HTH // Fredrik Blomqvist