mirror of
https://github.com/boostorg/unordered.git
synced 2025-05-11 13:34:06 +00:00
Update test metafunction to use boost::declval
instead of using null pointers
This commit is contained in:
parent
aaf79c5202
commit
39d60cd91d
@ -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&>()))));
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user