forked from boostorg/core
Deprecated boost::core::is_same and the associated header.
Moved is_same implementation to detail (both directory and namespace) to use in the public headers and avoid introducing new dependencies. The documentation now recommends users to use Boost.TypeTraits or C++ standard library instead. Also, removed unnecessary includes and added missing ones in a few places.
This commit is contained in:
@@ -6,25 +6,25 @@ Distributed under the Boost Software License, Version 1.0.
|
||||
(http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
#include <boost/core/pointer_traits.hpp>
|
||||
#include <boost/core/is_same.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
#include <boost/core/detail/is_same.hpp>
|
||||
|
||||
template<class T>
|
||||
struct P { };
|
||||
|
||||
int main()
|
||||
{
|
||||
BOOST_TEST_TRAIT_TRUE((boost::core::is_same<int*,
|
||||
BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same<int*,
|
||||
boost::pointer_traits<int*>::pointer>));
|
||||
BOOST_TEST_TRAIT_TRUE((boost::core::is_same<P<int>,
|
||||
BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same<P<int>,
|
||||
boost::pointer_traits<P<int> >::pointer>));
|
||||
BOOST_TEST_TRAIT_TRUE((boost::core::is_same<void*,
|
||||
BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same<void*,
|
||||
boost::pointer_traits<void*>::pointer>));
|
||||
BOOST_TEST_TRAIT_TRUE((boost::core::is_same<P<void>,
|
||||
BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same<P<void>,
|
||||
boost::pointer_traits<P<void> >::pointer>));
|
||||
BOOST_TEST_TRAIT_TRUE((boost::core::is_same<const int*,
|
||||
BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same<const int*,
|
||||
boost::pointer_traits<const int*>::pointer>));
|
||||
BOOST_TEST_TRAIT_TRUE((boost::core::is_same<P<const int>,
|
||||
BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same<P<const int>,
|
||||
boost::pointer_traits<P<const int> >::pointer>));
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user