summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/23_containers/array/element_access
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@redhat.com>2012-10-18 08:36:06 +0000
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2012-10-18 08:36:06 +0000
commita9ba8ba56c16e80fd9134822bdfe34f565f4ccf4 (patch)
tree4b2998e8222d758131a6b3f6b82324e81255caff /libstdc++-v3/testsuite/23_containers/array/element_access
parent21676429323df89107360981500ca774e5be45ee (diff)
downloadgcc-a9ba8ba56c16e80fd9134822bdfe34f565f4ccf4.tar.gz
move.h (move_if_noexcept): Mark constexpr.
2012-10-17 Benjamin Kosnik <bkoz@redhat.com> * include/bits/move.h (move_if_noexcept): Mark constexpr. * include/std/array (front, back): Same. * include/std/chrono: Add comment. * include/std/tuple (__tuple_compare): Mark __eq, __less constexpr. (operator ==, <, >, !=, <=, >=): Same. * testsuite/20_util/forward/c_neg.cc: Adjust line numbers. * testsuite/20_util/forward/f_neg.cc: Same. * testsuite/20_util/move_if_noexcept/constexpr.cc: New. * testsuite/20_util/tuple/comparison_operators/constexpr.cc: New. * testsuite/20_util/tuple/creation_functions/constexpr.cc: Add. * testsuite/23_containers/array/element_access/ constexpr_element_access.cc: Same. * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust line numbers. * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc: Same. * testsuite/20_util/tuple/comparison_operators/35480_neg.cc: Temporarily add dg-excess-errors. From-SVN: r192556
Diffstat (limited to 'libstdc++-v3/testsuite/23_containers/array/element_access')
-rw-r--r--libstdc++-v3/testsuite/23_containers/array/element_access/constexpr_element_access.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/libstdc++-v3/testsuite/23_containers/array/element_access/constexpr_element_access.cc b/libstdc++-v3/testsuite/23_containers/array/element_access/constexpr_element_access.cc
index c2f301adcd4..ec46ac0d388 100644
--- a/libstdc++-v3/testsuite/23_containers/array/element_access/constexpr_element_access.cc
+++ b/libstdc++-v3/testsuite/23_containers/array/element_access/constexpr_element_access.cc
@@ -1,7 +1,7 @@
// { dg-do compile }
// { dg-options "-std=gnu++0x" }
-// Copyright (C) 2011 Free Software Foundation, Inc.
+// Copyright (C) 2011-2012 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
@@ -27,5 +27,7 @@ int main()
constexpr array_type a = { { 0, 55, 66, 99, 4115, 2 } };
constexpr auto v1 __attribute__((unused)) = a[1];
constexpr auto v2 __attribute__((unused)) = a.at(2);
+ constexpr auto v3 __attribute__((unused)) = a.front();
+ constexpr auto v4 __attribute__((unused)) = a.back();
return 0;
}