|
Boost Users : |
From: Fredrik Blomqvist (fredrik_blomqvist_at_[hidden])
Date: 2005-04-12 13:42:46
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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net