summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/include/std/tuple
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-16 00:41:33 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-16 00:41:33 +0000
commit13197b1a99dbd7aa34765380ab7a38b4da4d254e (patch)
treebab2ad9f8a527f32cd95ea64e678e5970b52e1fb /libstdc++-v3/include/std/tuple
parent862bff4d3c443b2a01dc9bc2487fba12150d484f (diff)
downloadppe42-gcc-13197b1a99dbd7aa34765380ab7a38b4da4d254e.tar.gz
ppe42-gcc-13197b1a99dbd7aa34765380ab7a38b4da4d254e.zip
2011-09-15 Paolo Carlini <paolo.carlini@oracle.com>
* include/std/tuple (make_tuple, forward_as_tuple): Declare constexpr. (_Tuple_impl<>::_Tuple_impl(_Tuple_impl<>&&)): Likewise. * testsuite/20_util/tuple/creation_functions/constexpr.cc: Enable make_tuple test. * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust dg-warning line number. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178904 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/std/tuple')
-rw-r--r--libstdc++-v3/include/std/tuple13
1 files changed, 7 insertions, 6 deletions
diff --git a/libstdc++-v3/include/std/tuple b/libstdc++-v3/include/std/tuple
index 1eec951fd15..51be289d506 100644
--- a/libstdc++-v3/include/std/tuple
+++ b/libstdc++-v3/include/std/tuple
@@ -273,6 +273,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
constexpr _Tuple_impl(const _Tuple_impl&) = default;
+ constexpr
_Tuple_impl(_Tuple_impl&& __in)
noexcept(__and_<is_nothrow_move_constructible<_Head>,
is_nothrow_move_constructible<_Inherited>>::value)
@@ -285,9 +286,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_Base(_Tuple_impl<_Idx, _UElements...>::_M_head(__in)) { }
template<typename _UHead, typename... _UTails>
- _Tuple_impl(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in)
- : _Inherited(std::move
- (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))),
+ constexpr _Tuple_impl(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in)
+ : _Inherited(std::move
+ (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))),
_Base(std::forward<_UHead>
(_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in))) { }
@@ -580,7 +581,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _U1, typename _U2, typename = typename
enable_if<__and_<is_convertible<_U1, _T1>,
is_convertible<_U2, _T2>>::value>::type>
- constexpr tuple(pair<_U1, _U2>&& __in)
+ constexpr tuple(pair<_U1, _U2>&& __in)
: _Inherited(std::forward<_U1>(__in.first),
std::forward<_U2>(__in.second)) { }
@@ -872,7 +873,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// NB: DR 705.
template<typename... _Elements>
- inline tuple<typename __decay_and_strip<_Elements>::__type...>
+ constexpr tuple<typename __decay_and_strip<_Elements>::__type...>
make_tuple(_Elements&&... __args)
{
typedef tuple<typename __decay_and_strip<_Elements>::__type...>
@@ -881,7 +882,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
template<typename... _Elements>
- inline tuple<_Elements&&...>
+ constexpr tuple<_Elements&&...>
forward_as_tuple(_Elements&&... __args) noexcept
{ return tuple<_Elements&&...>(std::forward<_Elements>(__args)...); }
OpenPOWER on IntegriCloud