summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-06 03:35:46 +0000
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-06 03:35:46 +0000
commit327f127d1bd4ac290b50a0bb35ee57a657e5aaae (patch)
treef8596fda8df8c1d5d1c10f99072f04158f5e7d1e /libstdc++-v3
parent494f3f05703f498e674b3c7c229315f4a803e0a8 (diff)
downloadgcc-327f127d1bd4ac290b50a0bb35ee57a657e5aaae.tar.gz
2010-11-05 Benjamin Kosnik <bkoz@redhat.com>
* doc/doxygen/user.cfg.in: Add typeindex. * testsuite/util/testsuite_common_types.h (constexpr_comparison_eq_ne, constexpr_comparison_operators): New. * testsuite/20_util/duration/comparisons: Move... * testsuite/20_util/duration/comparison_operators: ...here. * testsuite/20_util/duration/comparison_operators/constexpr.cc: New. * testsuite/20_util/time_point/comparison_operators/constexpr.cc: Add. * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Adjust line numbers. * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Same. * testsuite/29_atomics/atomic/cons/assign_neg.cc: Same. * testsuite/29_atomics/atomic/cons/copy_neg.cc: Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166392 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog17
-rw-r--r--libstdc++-v3/doc/doxygen/user.cfg.in1
-rw-r--r--libstdc++-v3/testsuite/20_util/duration/comparison_operators/1.cc (renamed from libstdc++-v3/testsuite/20_util/duration/comparisons/1.cc)0
-rw-r--r--libstdc++-v3/testsuite/20_util/duration/comparison_operators/constexpr.cc29
-rw-r--r--libstdc++-v3/testsuite/20_util/time_point/comparison_operators/constexpr.cc30
-rw-r--r--libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/assign_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_common_types.h29
10 files changed, 109 insertions, 5 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 672d9f1a639..262a74a6c3c 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,20 @@
+2010-11-05 Benjamin Kosnik <bkoz@redhat.com>
+
+ * doc/doxygen/user.cfg.in: Add typeindex.
+
+ * testsuite/util/testsuite_common_types.h (constexpr_comparison_eq_ne,
+ constexpr_comparison_operators): New.
+ * testsuite/20_util/duration/comparisons: Move...
+ * testsuite/20_util/duration/comparison_operators: ...here.
+ * testsuite/20_util/duration/comparison_operators/constexpr.cc: New.
+ * testsuite/20_util/time_point/comparison_operators/constexpr.cc: Add.
+
+ * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Adjust line
+ numbers.
+ * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Same.
+ * testsuite/29_atomics/atomic/cons/assign_neg.cc: Same.
+ * testsuite/29_atomics/atomic/cons/copy_neg.cc: Same.
+
2010-11-05 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/shared_ptr.h (shared_ptr<>::__shared_ptr(),
diff --git a/libstdc++-v3/doc/doxygen/user.cfg.in b/libstdc++-v3/doc/doxygen/user.cfg.in
index ed5c5a14810..32ea7481fb9 100644
--- a/libstdc++-v3/doc/doxygen/user.cfg.in
+++ b/libstdc++-v3/doc/doxygen/user.cfg.in
@@ -631,6 +631,7 @@ INPUT = @srcdir@/doc/doxygen/doxygroups.cc \
include/system_error \
include/thread \
include/tuple \
+ include/typeindex \
include/type_traits \
include/unordered_map \
include/unordered_set \
diff --git a/libstdc++-v3/testsuite/20_util/duration/comparisons/1.cc b/libstdc++-v3/testsuite/20_util/duration/comparison_operators/1.cc
index 35151f2ad54..35151f2ad54 100644
--- a/libstdc++-v3/testsuite/20_util/duration/comparisons/1.cc
+++ b/libstdc++-v3/testsuite/20_util/duration/comparison_operators/1.cc
diff --git a/libstdc++-v3/testsuite/20_util/duration/comparison_operators/constexpr.cc b/libstdc++-v3/testsuite/20_util/duration/comparison_operators/constexpr.cc
new file mode 100644
index 00000000000..94338cee316
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/duration/comparison_operators/constexpr.cc
@@ -0,0 +1,29 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <chrono>
+#include <testsuite_common_types.h>
+
+int main()
+{
+ __gnu_test::constexpr_comparison_operators test;
+ test.operator()<std::chrono::nanoseconds>();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/20_util/time_point/comparison_operators/constexpr.cc b/libstdc++-v3/testsuite/20_util/time_point/comparison_operators/constexpr.cc
new file mode 100644
index 00000000000..427c5137021
--- /dev/null
+++ b/libstdc++-v3/testsuite/20_util/time_point/comparison_operators/constexpr.cc
@@ -0,0 +1,30 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+// Copyright (C) 2010 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <chrono>
+#include <testsuite_common_types.h>
+
+int main()
+{
+ using namespace std::chrono;
+ __gnu_test::constexpr_comparison_operators test;
+ test.operator()<time_point<system_clock>>();
+ return 0;
+}
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc
index 9272c7eb3da..6b04cf81db0 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc
@@ -28,5 +28,5 @@ int main()
return 0;
}
-// { dg-error "deleted" "" { target *-*-* } 544 }
+// { dg-error "deleted" "" { target *-*-* } 571 }
// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc
index 19b3a150c19..cdd95fd1b49 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc
@@ -28,5 +28,5 @@ int main()
return 0;
}
-// { dg-error "deleted" "" { target *-*-* } 583 }
+// { dg-error "deleted" "" { target *-*-* } 610 }
// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/assign_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/assign_neg.cc
index 12da321abd8..265878d39df 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/assign_neg.cc
@@ -29,5 +29,5 @@ int main()
return 0;
}
-// { dg-error "deleted" "" { target *-*-* } 544 }
+// { dg-error "deleted" "" { target *-*-* } 571 }
// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_neg.cc
index e334f1b0447..acb8006ac46 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_neg.cc
@@ -29,5 +29,5 @@ int main()
return 0;
}
-// { dg-error "deleted" "" { target *-*-* } 583 }
+// { dg-error "deleted" "" { target *-*-* } 610 }
// { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/util/testsuite_common_types.h b/libstdc++-v3/testsuite/util/testsuite_common_types.h
index c601063b0a3..c78f9450417 100644
--- a/libstdc++-v3/testsuite/util/testsuite_common_types.h
+++ b/libstdc++-v3/testsuite/util/testsuite_common_types.h
@@ -462,8 +462,35 @@ namespace __gnu_test
}
};
- // Generator to test standard layout
#ifdef __GXX_EXPERIMENTAL_CXX0X__
+
+ struct constexpr_comparison_eq_ne
+ {
+ template<typename _Tp1, typename _Tp2 = _Tp1>
+ void
+ operator()()
+ {
+ static_assert(_Tp1() == _Tp2(), "eq");
+ static_assert(!(_Tp1() != _Tp2()), "ne");
+ }
+ };
+
+ struct constexpr_comparison_operators
+ {
+ template<typename _Tp>
+ void
+ operator()()
+ {
+ static_assert(!(_Tp() < _Tp()), "less");
+ static_assert(_Tp() <= _Tp(), "leq");
+ static_assert(!(_Tp() > _Tp()), "more");
+ static_assert(_Tp() >= _Tp(), "meq");
+ static_assert(_Tp() == _Tp(), "eq");
+ static_assert(!(_Tp() != _Tp()), "ne");
+ }
+ };
+
+ // Generator to test standard layout
struct has_trivial_cons_dtor
{
template<typename _Tp>