diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2015-01-08 06:18:59 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2015-01-08 06:18:59 +0000 |
commit | c51d3ecb98bc3559c8ad4c785f241e84f5fc3877 (patch) | |
tree | 0e55a2eb0e360965b5af871dd21ba871646ceb55 /libcxx/test/std | |
parent | b9c402ed25238f9fd4b61180b2e0c4105d867590 (diff) | |
download | bcm5719-llvm-c51d3ecb98bc3559c8ad4c785f241e84f5fc3877.tar.gz bcm5719-llvm-c51d3ecb98bc3559c8ad4c785f241e84f5fc3877.zip |
Add checks to make sure the hash functor has the right typedefs
llvm-svn: 225429
Diffstat (limited to 'libcxx/test/std')
-rw-r--r-- | libcxx/test/std/utilities/type.index/type.index.hash/hash.pass.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libcxx/test/std/utilities/type.index/type.index.hash/hash.pass.cpp b/libcxx/test/std/utilities/type.index/type.index.hash/hash.pass.cpp index 259f313db18..c5ffacfa37e 100644 --- a/libcxx/test/std/utilities/type.index/type.index.hash/hash.pass.cpp +++ b/libcxx/test/std/utilities/type.index/type.index.hash/hash.pass.cpp @@ -23,6 +23,10 @@ int main() { + typedef std::hash<std::type_index> H; + static_assert((std::is_same<typename H::argument_type, std::type_index>::value), "" ); + static_assert((std::is_same<typename H::result_type, std::size_t>::value), "" ); + std::type_index t1 = typeid(int); assert(std::hash<std::type_index>()(t1) == t1.hash_code()); } |