From 86bf1d4aeccf3327b8c7084c2a7244a3a6b78c17 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Thu, 22 Dec 2022 15:46:55 +0300 Subject: [PATCH] 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. --- doc/changes.qbk | 3 + doc/is_same.qbk | 5 ++ doc/lightweight_test.qbk | 4 +- include/boost/core/detail/is_same.hpp | 39 +++++++++ include/boost/core/detail/string_view.hpp | 12 +-- include/boost/core/is_same.hpp | 25 +++--- include/boost/core/lightweight_test_trait.hpp | 6 +- include/boost/core/type_name.hpp | 1 - test/CMakeLists.txt | 2 +- test/allocator_const_pointer_test.cpp | 6 +- test/allocator_const_void_pointer_test.cpp | 6 +- test/allocator_difference_type_test.cpp | 6 +- test/allocator_is_always_equal_test.cpp | 1 - test/allocator_pocca_test.cpp | 1 - test/allocator_pocma_test.cpp | 1 - test/allocator_pocs_test.cpp | 1 - test/allocator_pointer_test.cpp | 6 +- test/allocator_rebind_test.cpp | 6 +- test/allocator_size_type_test.cpp | 11 ++- test/allocator_value_type_test.cpp | 4 +- test/allocator_void_pointer_test.cpp | 6 +- test/detail_iterator_test.cpp | 4 +- test/eif_lazy_test.cpp | 12 +-- test/is_same_test.cpp | 26 +++--- test/iterator_test.cpp | 4 +- test/pointer_traits_difference_type_test.cpp | 20 ++--- test/pointer_traits_element_type_test.cpp | 32 +++---- test/pointer_traits_pointer_test.cpp | 14 +-- test/pointer_traits_rebind_test.cpp | 86 +++++++++---------- test/quick.cpp | 3 +- test/ref_ct_test.cpp | 12 +-- test/ref_test.cpp | 2 +- test/sv_types_test.cpp | 1 - test/underlying_type.cpp | 6 +- 34 files changed, 206 insertions(+), 168 deletions(-) create mode 100644 include/boost/core/detail/is_same.hpp diff --git a/doc/changes.qbk b/doc/changes.qbk index e314558..8e63a18 100644 --- a/doc/changes.qbk +++ b/doc/changes.qbk @@ -11,6 +11,9 @@ * Added [link core.snprintf `boost/core/snprintf.hpp`] header with portable definitions of `snprintf`, `vsnprintf` and their `wchar_t` counterparts. +* Deprecated `boost/core/is_same.hpp` and `boost::core::is_same`. The header will be removed in a future release. + Users are advised to use [@http://www.boost.org/doc/libs/release/libs/type_traits/doc/html/index.html Boost.TypeTraits] + or C++ standard library type traits instead. [endsect] diff --git a/doc/is_same.qbk b/doc/is_same.qbk index 657c591..304ae4e 100644 --- a/doc/is_same.qbk +++ b/doc/is_same.qbk @@ -17,6 +17,11 @@ [section Header ] +[warning This component is deprecated and will be removed in a future release. +Users are recommended to use `boost::is_same` from +[@http://www.boost.org/doc/libs/release/libs/type_traits/doc/html/index.html Boost.TypeTraits] +or `std::is_same` from C++ standard library `` instead.] + The header `` defines the class template `boost::core::is_same`. It defines a nested integral constant `value` which is `true` when `T1` and `T2` are the same type, and diff --git a/doc/lightweight_test.qbk b/doc/lightweight_test.qbk index 698485a..9073b08 100644 --- a/doc/lightweight_test.qbk +++ b/doc/lightweight_test.qbk @@ -326,14 +326,14 @@ parentheses.) `` #include -#include +#include template struct X { typedef T type; }; -using boost::core::is_same; +using boost::is_same; int main() { diff --git a/include/boost/core/detail/is_same.hpp b/include/boost/core/detail/is_same.hpp new file mode 100644 index 0000000..634d300 --- /dev/null +++ b/include/boost/core/detail/is_same.hpp @@ -0,0 +1,39 @@ +#ifndef BOOST_CORE_DETAIL_IS_SAME_HPP_INCLUDED +#define BOOST_CORE_DETAIL_IS_SAME_HPP_INCLUDED + +// is_same::value is true when T1 == T2 +// +// Copyright 2014 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include + +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +namespace boost +{ +namespace core +{ +namespace detail +{ + +template< class T1, class T2 > struct is_same +{ + BOOST_STATIC_CONSTANT( bool, value = false ); +}; + +template< class T > struct is_same< T, T > +{ + BOOST_STATIC_CONSTANT( bool, value = true ); +}; + +} // namespace detail +} // namespace core +} // namespace boost + +#endif // #ifndef BOOST_CORE_DETAIL_IS_SAME_HPP_INCLUDED diff --git a/include/boost/core/detail/string_view.hpp b/include/boost/core/detail/string_view.hpp index 5a1f6c8..1d89b8b 100644 --- a/include/boost/core/detail/string_view.hpp +++ b/include/boost/core/detail/string_view.hpp @@ -14,7 +14,7 @@ // https://www.boost.org/LICENSE_1_0.txt #include -#include +#include #include #include #include @@ -381,7 +381,7 @@ public: } template BOOST_CXX14_CONSTEXPR basic_string_view( Ch const* first, End last, - typename boost::enable_if >::type* = 0 ) BOOST_NOEXCEPT: p_( first ), n_( last - first ) + typename boost::enable_if >::type* = 0 ) BOOST_NOEXCEPT: p_( first ), n_( last - first ) { BOOST_ASSERT( last - first >= 0 ); } @@ -399,7 +399,7 @@ public: #endif template basic_string_view( boost::basic_string_view > const& str, - typename boost::enable_if >::type* = 0 ) BOOST_NOEXCEPT: p_( str.data() ), n_( str.size() ) + typename boost::enable_if >::type* = 0 ) BOOST_NOEXCEPT: p_( str.data() ), n_( str.size() ) { } @@ -430,7 +430,7 @@ public: #if !defined(BOOST_NO_CXX17_HDR_STRING_VIEW) - template >::type> + template >::type> operator std::basic_string_view() const BOOST_NOEXCEPT { return std::basic_string_view( data(), size() ); @@ -439,7 +439,7 @@ public: #endif template operator boost::basic_string_view, std::char_traits >::type> () const BOOST_NOEXCEPT + typename boost::enable_if, std::char_traits >::type> () const BOOST_NOEXCEPT { return boost::basic_string_view< Ch, std::char_traits >( data(), size() ); } @@ -605,7 +605,7 @@ public: if( cmp != 0 ) return cmp; if( size() == str.size() ) return 0; - + return size() < str.size()? -1: +1; } diff --git a/include/boost/core/is_same.hpp b/include/boost/core/is_same.hpp index f373c65..111cbd1 100644 --- a/include/boost/core/is_same.hpp +++ b/include/boost/core/is_same.hpp @@ -1,12 +1,6 @@ #ifndef BOOST_CORE_IS_SAME_HPP_INCLUDED #define BOOST_CORE_IS_SAME_HPP_INCLUDED -// MS compatible compilers support #pragma once - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - // is_same::value is true when T1 == T2 // // Copyright 2014 Peter Dimov @@ -16,6 +10,15 @@ // http://www.boost.org/LICENSE_1_0.txt #include +#include + +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +#include + +BOOST_HEADER_DEPRECATED("") namespace boost { @@ -23,15 +26,7 @@ namespace boost namespace core { -template< class T1, class T2 > struct is_same -{ - BOOST_STATIC_CONSTANT( bool, value = false ); -}; - -template< class T > struct is_same< T, T > -{ - BOOST_STATIC_CONSTANT( bool, value = true ); -}; +using boost::core::detail::is_same; } // namespace core diff --git a/include/boost/core/lightweight_test_trait.hpp b/include/boost/core/lightweight_test_trait.hpp index 77a1fcd..eea2371 100644 --- a/include/boost/core/lightweight_test_trait.hpp +++ b/include/boost/core/lightweight_test_trait.hpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include namespace boost @@ -56,7 +56,7 @@ template inline bool test_trait_same_impl_( T ) } template inline void test_trait_same_impl( char const * types, - boost::core::is_same same, char const * file, int line, char const * function ) + boost::core::detail::is_same same, char const * file, int line, char const * function ) { if( test_trait_same_impl_( same ) ) { @@ -86,6 +86,6 @@ template inline void test_trait_same_impl( char const * type # pragma GCC system_header #endif -#define BOOST_TEST_TRAIT_SAME(...) ( ::boost::detail::test_trait_same_impl(#__VA_ARGS__, ::boost::core::is_same<__VA_ARGS__>(), __FILE__, __LINE__, BOOST_CURRENT_FUNCTION) ) +#define BOOST_TEST_TRAIT_SAME(...) ( ::boost::detail::test_trait_same_impl(#__VA_ARGS__, ::boost::core::detail::is_same< __VA_ARGS__ >(), __FILE__, __LINE__, BOOST_CURRENT_FUNCTION) ) #endif // #ifndef BOOST_CORE_LIGHTWEIGHT_TEST_TRAIT_HPP diff --git a/include/boost/core/type_name.hpp b/include/boost/core/type_name.hpp index 21faa3c..81c18e6 100644 --- a/include/boost/core/type_name.hpp +++ b/include/boost/core/type_name.hpp @@ -14,7 +14,6 @@ // https://www.boost.org/LICENSE_1_0.txt #include -#include #include #include #include diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 5521551..88c0889 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -6,7 +6,7 @@ include(BoostTestJamfile OPTIONAL RESULT_VARIABLE HAVE_BOOST_TEST) if(HAVE_BOOST_TEST) -boost_test_jamfile(FILE Jamfile.v2 LINK_LIBRARIES Boost::core Boost::static_assert) +boost_test_jamfile(FILE Jamfile.v2 LINK_LIBRARIES Boost::core Boost::static_assert Boost::type_traits) set(BOOST_TEST_LINK_LIBRARIES Boost::core Boost::type_traits) diff --git a/test/allocator_const_pointer_test.cpp b/test/allocator_const_pointer_test.cpp index fb83627..ef0dec1 100644 --- a/test/allocator_const_pointer_test.cpp +++ b/test/allocator_const_pointer_test.cpp @@ -6,8 +6,8 @@ Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ #include -#include #include +#include template struct A1 { @@ -22,9 +22,9 @@ struct A2 { int main() { - BOOST_TEST_TRAIT_TRUE((boost::core::is_same >::type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same >::type>)); return boost::report_errors(); } diff --git a/test/allocator_const_void_pointer_test.cpp b/test/allocator_const_void_pointer_test.cpp index 9f8610c..c611d5f 100644 --- a/test/allocator_const_void_pointer_test.cpp +++ b/test/allocator_const_void_pointer_test.cpp @@ -6,8 +6,8 @@ Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ #include -#include #include +#include template struct A1 { @@ -27,9 +27,9 @@ struct A2 { int main() { - BOOST_TEST_TRAIT_TRUE((boost::core::is_same >::type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same >::type>)); return boost::report_errors(); } diff --git a/test/allocator_difference_type_test.cpp b/test/allocator_difference_type_test.cpp index c0c0316..610f592 100644 --- a/test/allocator_difference_type_test.cpp +++ b/test/allocator_difference_type_test.cpp @@ -6,8 +6,8 @@ Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ #include -#include #include +#include template struct A1 { @@ -22,9 +22,9 @@ struct A2 { int main() { - BOOST_TEST_TRAIT_TRUE((boost::core::is_same >::type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same >::type>)); return boost::report_errors(); } diff --git a/test/allocator_is_always_equal_test.cpp b/test/allocator_is_always_equal_test.cpp index fd2c03e..378eb19 100644 --- a/test/allocator_is_always_equal_test.cpp +++ b/test/allocator_is_always_equal_test.cpp @@ -6,7 +6,6 @@ Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ #include -#include #include template diff --git a/test/allocator_pocca_test.cpp b/test/allocator_pocca_test.cpp index 853473a..40a7aa1 100644 --- a/test/allocator_pocca_test.cpp +++ b/test/allocator_pocca_test.cpp @@ -6,7 +6,6 @@ Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ #include -#include #include template diff --git a/test/allocator_pocma_test.cpp b/test/allocator_pocma_test.cpp index 6c0c8e3..7738054 100644 --- a/test/allocator_pocma_test.cpp +++ b/test/allocator_pocma_test.cpp @@ -6,7 +6,6 @@ Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ #include -#include #include template diff --git a/test/allocator_pocs_test.cpp b/test/allocator_pocs_test.cpp index 2f90f3f..bf62738 100644 --- a/test/allocator_pocs_test.cpp +++ b/test/allocator_pocs_test.cpp @@ -6,7 +6,6 @@ Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ #include -#include #include template diff --git a/test/allocator_pointer_test.cpp b/test/allocator_pointer_test.cpp index 6ff445e..a88fc7e 100644 --- a/test/allocator_pointer_test.cpp +++ b/test/allocator_pointer_test.cpp @@ -6,8 +6,8 @@ Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ #include -#include #include +#include template struct A1 { @@ -22,9 +22,9 @@ struct A2 { int main() { - BOOST_TEST_TRAIT_TRUE((boost::core::is_same >::type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same >::type>)); return boost::report_errors(); } diff --git a/test/allocator_rebind_test.cpp b/test/allocator_rebind_test.cpp index 88015f2..5f1577a 100644 --- a/test/allocator_rebind_test.cpp +++ b/test/allocator_rebind_test.cpp @@ -6,8 +6,8 @@ Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ #include -#include #include +#include template struct A1 { @@ -25,9 +25,9 @@ struct A2 { int main() { - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::allocator_rebind, bool>::type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::allocator_rebind, int>::type>)); return boost::report_errors(); } diff --git a/test/allocator_size_type_test.cpp b/test/allocator_size_type_test.cpp index cb84965..50301ca 100644 --- a/test/allocator_size_type_test.cpp +++ b/test/allocator_size_type_test.cpp @@ -6,8 +6,11 @@ Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ #include -#include #include +#include +#if !defined(BOOST_NO_CXX11_ALLOCATOR) +#include +#endif template struct A1 { @@ -24,11 +27,11 @@ struct A2 { int main() { - BOOST_TEST_TRAIT_TRUE((boost::core::is_same >::type>)); #if !defined(BOOST_NO_CXX11_ALLOCATOR) - BOOST_TEST_TRAIT_TRUE((boost::core::is_same< - std::make_unsigned::type, + BOOST_TEST_TRAIT_TRUE((boost::is_same< + boost::make_unsigned::type, boost::allocator_size_type >::type>)); #endif return boost::report_errors(); diff --git a/test/allocator_value_type_test.cpp b/test/allocator_value_type_test.cpp index 575222c..eb9c92a 100644 --- a/test/allocator_value_type_test.cpp +++ b/test/allocator_value_type_test.cpp @@ -6,8 +6,8 @@ Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ #include -#include #include +#include template struct A { @@ -16,7 +16,7 @@ struct A { int main() { - BOOST_TEST_TRAIT_TRUE((boost::core::is_same >::type>)); return boost::report_errors(); } diff --git a/test/allocator_void_pointer_test.cpp b/test/allocator_void_pointer_test.cpp index d7133be..1569673 100644 --- a/test/allocator_void_pointer_test.cpp +++ b/test/allocator_void_pointer_test.cpp @@ -6,8 +6,8 @@ Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ #include -#include #include +#include template struct A1 { @@ -27,9 +27,9 @@ struct A2 { int main() { - BOOST_TEST_TRAIT_TRUE((boost::core::is_same >::type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same >::type>)); return boost::report_errors(); } diff --git a/test/detail_iterator_test.cpp b/test/detail_iterator_test.cpp index 13eef58..0865ec4 100644 --- a/test/detail_iterator_test.cpp +++ b/test/detail_iterator_test.cpp @@ -10,8 +10,8 @@ #define BOOST_ALLOW_DEPRECATED_HEADERS #include -#include #include +#include #include #include @@ -62,7 +62,7 @@ struct iterator int main() { - using boost::core::is_same; + using boost::is_same; /* template struct iterator_traits { diff --git a/test/eif_lazy_test.cpp b/test/eif_lazy_test.cpp index 8938a3d..3eb1ae7 100644 --- a/test/eif_lazy_test.cpp +++ b/test/eif_lazy_test.cpp @@ -12,7 +12,7 @@ // Testing all variations of lazy_enable_if. -#include +#include #include #include @@ -26,7 +26,7 @@ using boost::lazy_disable_if_c; template struct is_int_or_double { BOOST_STATIC_CONSTANT(bool, - value = (boost::is_same::value || + value = (boost::is_same::value || boost::is_same::value)); }; @@ -84,14 +84,14 @@ int main() BOOST_TEST(foo(1)); BOOST_TEST(foo(1.0)); - BOOST_TEST(!foo("1")); - BOOST_TEST(!foo(static_cast(0))); + BOOST_TEST(!foo("1")); + BOOST_TEST(!foo(static_cast(0))); BOOST_TEST(foo2(1)); BOOST_TEST(foo2(1.0)); - BOOST_TEST(!foo2("1")); - BOOST_TEST(!foo2(static_cast(0))); + BOOST_TEST(!foo2("1")); + BOOST_TEST(!foo2(static_cast(0))); return boost::report_errors(); } diff --git a/test/is_same_test.cpp b/test/is_same_test.cpp index 838db22..23a927c 100644 --- a/test/is_same_test.cpp +++ b/test/is_same_test.cpp @@ -1,5 +1,5 @@ // -// Test for core::is_same +// Test for core::detail::is_same // // Copyright 2014 Peter Dimov // @@ -8,7 +8,7 @@ // http://www.boost.org/LICENSE_1_0.txt // -#include +#include #include struct X @@ -21,18 +21,18 @@ struct Y int main() { - BOOST_TEST_TRAIT_TRUE(( boost::core::is_same )); - BOOST_TEST_TRAIT_TRUE(( boost::core::is_same )); - BOOST_TEST_TRAIT_TRUE(( boost::core::is_same )); - BOOST_TEST_TRAIT_TRUE(( boost::core::is_same )); - BOOST_TEST_TRAIT_TRUE(( boost::core::is_same )); + BOOST_TEST_TRAIT_TRUE(( boost::core::detail::is_same )); + BOOST_TEST_TRAIT_TRUE(( boost::core::detail::is_same )); + BOOST_TEST_TRAIT_TRUE(( boost::core::detail::is_same )); + BOOST_TEST_TRAIT_TRUE(( boost::core::detail::is_same )); + BOOST_TEST_TRAIT_TRUE(( boost::core::detail::is_same )); - BOOST_TEST_TRAIT_FALSE(( boost::core::is_same )); - BOOST_TEST_TRAIT_FALSE(( boost::core::is_same )); - BOOST_TEST_TRAIT_FALSE(( boost::core::is_same )); - BOOST_TEST_TRAIT_FALSE(( boost::core::is_same )); - BOOST_TEST_TRAIT_FALSE(( boost::core::is_same )); - BOOST_TEST_TRAIT_FALSE(( boost::core::is_same )); + BOOST_TEST_TRAIT_FALSE(( boost::core::detail::is_same )); + BOOST_TEST_TRAIT_FALSE(( boost::core::detail::is_same )); + BOOST_TEST_TRAIT_FALSE(( boost::core::detail::is_same )); + BOOST_TEST_TRAIT_FALSE(( boost::core::detail::is_same )); + BOOST_TEST_TRAIT_FALSE(( boost::core::detail::is_same )); + BOOST_TEST_TRAIT_FALSE(( boost::core::detail::is_same )); return boost::report_errors(); } diff --git a/test/iterator_test.cpp b/test/iterator_test.cpp index 3cbf038..5d8c52a 100644 --- a/test/iterator_test.cpp +++ b/test/iterator_test.cpp @@ -18,8 +18,8 @@ #if BOOST_CXX_VERSION < 201703 #include -#include #include +#include /* @@ -60,7 +60,7 @@ struct R int main() { - using boost::core::is_same; + using boost::is_same; BOOST_TEST_TRAIT_TRUE((is_same::iterator_category,C>)); BOOST_TEST_TRAIT_TRUE((is_same::value_type,T>)); diff --git a/test/pointer_traits_difference_type_test.cpp b/test/pointer_traits_difference_type_test.cpp index e9d0b09..52ad709 100644 --- a/test/pointer_traits_difference_type_test.cpp +++ b/test/pointer_traits_difference_type_test.cpp @@ -6,8 +6,8 @@ Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ #include -#include #include +#include template struct P { }; @@ -19,23 +19,23 @@ struct E { int main() { - BOOST_TEST_TRAIT_TRUE((boost::core::is_same::difference_type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same >::difference_type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same >::difference_type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same::difference_type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same >::difference_type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same >::difference_type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same::difference_type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same >::difference_type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same >::difference_type>)); return boost::report_errors(); } diff --git a/test/pointer_traits_element_type_test.cpp b/test/pointer_traits_element_type_test.cpp index a20733e..2b1bf12 100644 --- a/test/pointer_traits_element_type_test.cpp +++ b/test/pointer_traits_element_type_test.cpp @@ -6,8 +6,8 @@ Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ #include -#include #include +#include template struct P1 { }; @@ -45,39 +45,39 @@ struct E { int main() { - BOOST_TEST_TRAIT_TRUE((boost::core::is_same::element_type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same >::element_type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same >::element_type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same >::element_type>)); #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - BOOST_TEST_TRAIT_TRUE((boost::core::is_same >::element_type>)); #endif - BOOST_TEST_TRAIT_TRUE((boost::core::is_same >::element_type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same >::element_type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same >::element_type>)); #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - BOOST_TEST_TRAIT_TRUE((boost::core::is_same >::element_type>)); #endif - BOOST_TEST_TRAIT_TRUE((boost::core::is_same::element_type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same >::element_type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same >::element_type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same::element_type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same >::element_type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same >::element_type>)); return boost::report_errors(); } diff --git a/test/pointer_traits_pointer_test.cpp b/test/pointer_traits_pointer_test.cpp index a98eb4d..c8070f2 100644 --- a/test/pointer_traits_pointer_test.cpp +++ b/test/pointer_traits_pointer_test.cpp @@ -6,25 +6,25 @@ Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ #include -#include #include +#include template struct P { }; int main() { - BOOST_TEST_TRAIT_TRUE((boost::core::is_same::pointer>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::pointer>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same::pointer>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::pointer>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same::pointer>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::pointer>)); return boost::report_errors(); } diff --git a/test/pointer_traits_rebind_test.cpp b/test/pointer_traits_rebind_test.cpp index a009463..42c510e 100644 --- a/test/pointer_traits_rebind_test.cpp +++ b/test/pointer_traits_rebind_test.cpp @@ -6,8 +6,8 @@ Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ #include -#include #include +#include template struct P1 { }; @@ -55,94 +55,94 @@ struct R { }; int main() { - BOOST_TEST_TRAIT_TRUE((boost::core::is_same::rebind_to::type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind_to::type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind_to::type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind_to::type>)); #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind_to::type>)); #endif - BOOST_TEST_TRAIT_TRUE((boost::core::is_same::rebind_to::type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind_to::type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same::rebind_to::type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind_to::type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same::rebind_to::type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind_to::type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same::rebind_to::type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind_to::type>)); #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - BOOST_TEST_TRAIT_TRUE((boost::core::is_same::rebind >)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind >)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind >)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind >)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same::rebind >)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind >)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same::rebind >)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind >)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same::rebind >)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind >)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same::rebind >)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind >)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind_to::type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind_to::type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind_to::type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind >)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind >)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind >)); #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind >)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind_to::type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind >)); #endif - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind_to::type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind_to::type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind_to::type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind_to::type>)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind >)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind >)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind >)); - BOOST_TEST_TRAIT_TRUE((boost::core::is_same, + BOOST_TEST_TRAIT_TRUE((boost::core::detail::is_same, boost::pointer_traits >::rebind >)); #endif return boost::report_errors(); diff --git a/test/quick.cpp b/test/quick.cpp index fdfe983..4b381db 100644 --- a/test/quick.cpp +++ b/test/quick.cpp @@ -16,13 +16,12 @@ #include #include #include -#include #include #include #include #include #include -#include +#include #include #include #include diff --git a/test/ref_ct_test.cpp b/test/ref_ct_test.cpp index 9e5bf31..d69d013 100644 --- a/test/ref_ct_test.cpp +++ b/test/ref_ct_test.cpp @@ -6,10 +6,10 @@ // compile-time test for "boost/ref.hpp" header content // see 'ref_test.cpp' for run-time part -#include -#include +#include #include #include +#include namespace { @@ -17,8 +17,8 @@ template< typename T, typename U > void ref_test(boost::reference_wrapper) { typedef typename boost::reference_wrapper::type type; - BOOST_STATIC_ASSERT((boost::core::is_same::value)); - BOOST_STATIC_ASSERT((boost::core::is_same::value)); + BOOST_STATIC_ASSERT((boost::is_same::value)); + BOOST_STATIC_ASSERT((boost::is_same::value)); } template< typename T > @@ -42,14 +42,14 @@ void is_reference_wrapper_test(T) template< typename R, typename Ref > void cxx_reference_test(Ref) { - BOOST_STATIC_ASSERT((boost::core::is_same::value)); + BOOST_STATIC_ASSERT((boost::is_same::value)); } template< typename R, typename Ref > void unwrap_reference_test(Ref) { typedef typename boost::unwrap_reference::type type; - BOOST_STATIC_ASSERT((boost::core::is_same::value)); + BOOST_STATIC_ASSERT((boost::is_same::value)); } } // namespace diff --git a/test/ref_test.cpp b/test/ref_test.cpp index 6251b74..78585ad 100644 --- a/test/ref_test.cpp +++ b/test/ref_test.cpp @@ -6,7 +6,7 @@ // run-time test for "boost/ref.hpp" header content // see 'ref_ct_test.cpp' for compile-time part -#include +#include #include namespace { diff --git a/test/sv_types_test.cpp b/test/sv_types_test.cpp index 9011f0c..9afe05b 100644 --- a/test/sv_types_test.cpp +++ b/test/sv_types_test.cpp @@ -5,7 +5,6 @@ #include #include #include -#include #include struct Ch diff --git a/test/underlying_type.cpp b/test/underlying_type.cpp index 34f3940..27bc4f9 100644 --- a/test/underlying_type.cpp +++ b/test/underlying_type.cpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #if defined(_MSC_VER) @@ -63,9 +63,9 @@ struct underlying_type< native_enum > int main(int, char*[]) { - BOOST_TEST_TRAIT_TRUE((boost::core::is_same< boost::underlying_type< emulated_enum >::type, unsigned char >)); + BOOST_TEST_TRAIT_TRUE((boost::is_same< boost::underlying_type< emulated_enum >::type, unsigned char >)); #if !defined(BOOST_NO_CXX11_SCOPED_ENUMS) - BOOST_TEST_TRAIT_TRUE((boost::core::is_same< boost::underlying_type< native_enum >::type, unsigned short >)); + BOOST_TEST_TRAIT_TRUE((boost::is_same< boost::underlying_type< native_enum >::type, unsigned short >)); #endif return boost::report_errors();