Revert "Merge to upstream r304942."
This reverts commit83b1388ecd, reversing changes made tof20819f925. Test: treehugger Bug: None
This commit is contained in:
@@ -23,8 +23,6 @@
|
||||
#include <type_traits>
|
||||
#include <limits>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class T>
|
||||
void
|
||||
test()
|
||||
@@ -32,7 +30,6 @@ test()
|
||||
typedef std::hash<T> H;
|
||||
static_assert((std::is_same<typename H::argument_type, T>::value), "" );
|
||||
static_assert((std::is_same<typename H::result_type, std::size_t>::value), "" );
|
||||
ASSERT_NOEXCEPT(H()(T()));
|
||||
H h;
|
||||
|
||||
typedef typename std::remove_pointer<T>::type type;
|
||||
@@ -41,20 +38,7 @@ test()
|
||||
assert(h(&i) != h(&j));
|
||||
}
|
||||
|
||||
// can't hash nullptr_t until c++17
|
||||
void test_nullptr()
|
||||
{
|
||||
#if TEST_STD_VER > 14
|
||||
typedef std::nullptr_t T;
|
||||
typedef std::hash<T> H;
|
||||
static_assert((std::is_same<typename H::argument_type, T>::value), "" );
|
||||
static_assert((std::is_same<typename H::result_type, std::size_t>::value), "" );
|
||||
ASSERT_NOEXCEPT(H()(T()));
|
||||
#endif
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
test<int*>();
|
||||
test_nullptr();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user