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:
Andrey Semashev committed 2022-12-22 17:55:47 +03:00
1 parent 75c765cc13
commit 86bf1d4aec
34 files changed
+206 -168

No files matched your search

+6 -6
View File
@@ -12,7 +12,7 @@
// Testing all variations of lazy_enable_if.
#include <boost/utility/enable_if.hpp>
#include <boost/core/enable_if.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/core/lightweight_test.hpp>
@@ -26,7 +26,7 @@ using boost::lazy_disable_if_c;
template <class T>
struct is_int_or_double {
BOOST_STATIC_CONSTANT(bool,
value = (boost::is_same<T, int>::value ||
value = (boost::is_same<T, int>::value ||
boost::is_same<T, double>::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<void*>(0)));
BOOST_TEST(!foo("1"));
BOOST_TEST(!foo(static_cast<void*>(0)));
BOOST_TEST(foo2(1));
BOOST_TEST(foo2(1.0));
BOOST_TEST(!foo2("1"));
BOOST_TEST(!foo2(static_cast<void*>(0)));
BOOST_TEST(!foo2("1"));
BOOST_TEST(!foo2(static_cast<void*>(0)));
return boost::report_errors();
}