summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/23_containers/bitset
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2010-03-02 21:11:19 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2010-03-02 21:11:19 +0000
commit4cd533a7c73a0813a39b41147c9fe771fd65fd28 (patch)
tree5e48d10195e6a0bccc697e1485ec1558a6910b5f /libstdc++-v3/testsuite/23_containers/bitset
parent54bceaf397784a87995fa91a039dcb328b120bc9 (diff)
downloadgcc-4cd533a7c73a0813a39b41147c9fe771fd65fd28.tar.gz
stl_bvector.h (hash<vector<bool, _Alloc>>): Add.
2010-03-02 Paolo Carlini <paolo.carlini@oracle.com> * include/bits/stl_bvector.h (hash<vector<bool, _Alloc>>): Add. * include/debug/vector (hash<__debug::vector<bool, _Alloc>>): Likewise. * include/profile/vector (hash<__profile::vector<bool, _Alloc>>): Likewise. * testsuite/23_containers/vector/bool/hash/1.cc: New. * include/std/bitset (hash<bitset<_Nb>>): Small tweaks. (hash<bitset<0>>): Add. * include/debug/bitset (hash<__debug::bitset<_Nb>>): Forward to hash<bitset<_Nb>>. * include/profile/bitset (hash<__profile::bitset<_Nb>>): Likewise. * testsuite/23_containers/bitset/hash/1.cc: Improve. From-SVN: r157176
Diffstat (limited to 'libstdc++-v3/testsuite/23_containers/bitset')
-rw-r--r--libstdc++-v3/testsuite/23_containers/bitset/hash/1.cc30
1 files changed, 24 insertions, 6 deletions
diff --git a/libstdc++-v3/testsuite/23_containers/bitset/hash/1.cc b/libstdc++-v3/testsuite/23_containers/bitset/hash/1.cc
index 84dc31aba4a..655192e4e8f 100644
--- a/libstdc++-v3/testsuite/23_containers/bitset/hash/1.cc
+++ b/libstdc++-v3/testsuite/23_containers/bitset/hash/1.cc
@@ -1,4 +1,3 @@
-// { dg-do compile }
// { dg-options "-std=gnu++0x" }
// Copyright (C) 2010 Free Software Foundation, Inc.
@@ -20,8 +19,27 @@
#include <bitset>
-// bitset hash
-std::hash<std::bitset<0>> h1;
-std::hash<std::bitset<10>> h2;
-std::hash<std::bitset<100>> h3;
-std::hash<std::bitset<1000>> h4;
+void test01()
+{
+ std::bitset<0> b0;
+ std::hash<std::bitset<0>> h0;
+ h0(b0);
+
+ std::bitset<10> b1;
+ std::hash<std::bitset<10>> h1;
+ h1(b1);
+
+ std::bitset<100> b2;
+ std::hash<std::bitset<100>> h2;
+ h2(b2);
+
+ std::bitset<1000> b3;
+ std::hash<std::bitset<1000>> h3;
+ h3(b3);
+}
+
+int main()
+{
+ test01();
+ return 0;
+}