2 Copyright 2014 Peter Dimov
4 Distributed under the Boost Software License, Version 1.0.
6 See accompanying file LICENSE_1_0.txt
7 or copy at http://boost.org/LICENSE_1_0.txt
10 [section:is_same is_same]
18 [section Header <boost/core/is_same.hpp>]
20 The header `<boost/core/is_same.hpp>` defines the class template
21 `boost::core::is_same<T1,T2>`. It defines a nested integral constant
22 `value` which is `true` when `T1` and `T2` are the same type, and
23 `false` when they are not.
25 In tandem with `BOOST_TEST_TRAIT_TRUE` and `BOOST_TEST_TRAIT_FALSE`,
26 `is_same` is useful for writing tests for traits classes that have
27 to define specific nested types.
37 template<class T1, class T2> struct is_same;
48 #include <boost/core/lightweight_test_trait.hpp>
49 #include <boost/core/is_same.hpp>
51 template<class T> struct X
56 using boost::core::is_same;
60 BOOST_TEST_TRAIT_TRUE(( is_same<X<int>::type, int&> ));
61 return boost::report_errors();