checking that two types are equal

Hi all, what is the command to check that two types, say Type0 and Type1 are equal? I'm looking for something like BOOST_STATIC_ASSERT(...) Thanks.

e r a écrit :
Hi all,
what is the command to check that two types, say Type0 and Type1 are equal? I'm looking for something like BOOST_STATIC_ASSERT(...)
Thanks.
boost::is_same<T0,T1> will return a boolean constant type that can be used with BOOST_MPL_ASSERT If i'm not mistaken it goes like this : BOOST_MPL_ASSERT((boost::is_same<T0,T>)); -- Joel FALCOU Research Engineer @ Institut d'Electronique Fondamentale Université PARIS SUD XI France

Joel FALCOU wrote:
e r a écrit :
Hi all,
what is the command to check that two types, say Type0 and Type1 are equal? I'm looking for something like BOOST_STATIC_ASSERT(...)
Thanks.
boost::is_same<T0,T1> will return a boolean constant type that can be used with BOOST_MPL_ASSERT If i'm not mistaken it goes like this :
BOOST_MPL_ASSERT((boost::is_same<T0,T>));
Thanks!
participants (2)
-
e r
-
Joel FALCOU