mirror of
https://github.com/boostorg/core.git
synced 2025-11-29 13:50:10 +01:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user