Update test metafunction to use boost::declval instead of using null pointers

This commit is contained in:
Christian Mazakas 2022-02-09 11:06:10 -08:00
parent aaf79c5202
commit 39d60cd91d

View File

@ -8,6 +8,7 @@
#include <boost/config.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/declval.hpp>
namespace test {
template <class Container>
@ -23,7 +24,9 @@ namespace test {
BOOST_STATIC_CONSTANT(bool,
value = sizeof(long) ==
sizeof(flip(
((Container*)0)->insert(*(typename Container::value_type*)0))));
(boost::declval<Container*>())
->insert(
boost::declval<typename Container::value_type const&>()))));
};
}