OSDN Git Service

2011-09-12 Daniel Krugler <daniel.kruegler@googlemail.com>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Sep 2011 00:06:25 +0000 (00:06 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Sep 2011 00:06:25 +0000 (00:06 +0000)
commitf749333e46c33ac8f58638d4d1e52ed7c0c9f6b5
tree1d1b473cbd14f8d7eee60c283785998a696c87cf
parent42f21e3e40a60233f1dbc2d48ca4fd29c17526bf
2011-09-12  Daniel Krugler  <daniel.kruegler@googlemail.com>
    Paolo Carlini  <paolo.carlini@oracle.com>

* include/std/tuple (_Head_base<>::_M_head, _Head_base<>::_M_tail,
_Tuple_impl<>::_M_head, _Tuple_impl<>::_M_tail): Change to static
constexpr functions; adjust everywhere.
(__get_helper, get): Declare constexpr all three overloads.
(tuple_cat): Declare constexpr; use late return type to improve
error messages.
* include/std/utility (__pair_get<>::__get, __pair_get<>::__move_get,
__pair_get<>::__const_get, get): Declare all constexpr.
* include/std/array (get): Likewise.
* testsuite/20_util/tuple/creation_functions/constexpr.cc: Re-enable
tuple_cat test.
* testsuite/23_containers/array/constexpr_get.cc: New.
* testsuite/20_util/tuple/element_access/constexpr_get.cc: Likewise.
* testsuite/20_util/pair/constexpr_get.cc: Likewise.
* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust dg-error
line number.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178799 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/array
libstdc++-v3/include/std/tuple
libstdc++-v3/include/std/utility
libstdc++-v3/testsuite/20_util/pair/constexpr_get.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/tuple/creation_functions/constexpr.cc
libstdc++-v3/testsuite/20_util/tuple/element_access/constexpr_get.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/weak_ptr/comparison/cmp_neg.cc
libstdc++-v3/testsuite/23_containers/array/constexpr_get.cc [new file with mode: 0644]