diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2010-08-06 14:46:08 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2010-08-06 14:46:08 +0000 |
commit | 00e9a94486dff064693e711d4161dcbdcf5bbe5b (patch) | |
tree | 5708435aabe2db96c7c94b9c13e8df3b049a2cce /libstdc++-v3/include | |
parent | f25496f35244af6ff790cdff903b92d38c4bd4ec (diff) | |
download | gcc-00e9a94486dff064693e711d4161dcbdcf5bbe5b.zip gcc-00e9a94486dff064693e711d4161dcbdcf5bbe5b.tar.gz gcc-00e9a94486dff064693e711d4161dcbdcf5bbe5b.tar.bz2 |
tuple (pack_arguments): Rename to forward_as_tuple and simplify, per US 98 and US 99.
2010-08-06 Paolo Carlini <paolo.carlini@oracle.com>
* include/std/tuple (pack_arguments): Rename to forward_as_tuple
and simplify, per US 98 and US 99.
* testsuite/20_util/tuple/creation_functions/pack_arguments.cc:
Rename to...
* testsuite/20_util/tuple/creation_functions/forward_as_tuple.cc:
... this, adjust.
* testsuite/20_util/pair/piecewise.cc: Adjust.
From-SVN: r162948
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r-- | libstdc++-v3/include/std/tuple | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/libstdc++-v3/include/std/tuple b/libstdc++-v3/include/std/tuple index 8b2252e..2e35241 100644 --- a/libstdc++-v3/include/std/tuple +++ b/libstdc++-v3/include/std/tuple @@ -549,27 +549,10 @@ namespace std return __result_type(std::forward<_Elements>(__args)...); } - template<typename _Tp, bool = is_array<_Tp>::value> - struct __pa_add_rvalue_reference_helper - { typedef typename std::add_rvalue_reference<_Tp>::type __type; }; - - template<typename _Tp> - struct __pa_add_rvalue_reference_helper<_Tp, true> - { typedef _Tp& __type; }; - - template<typename _Tp> - struct __pa_add_rvalue_reference - : public __pa_add_rvalue_reference_helper<_Tp> - { }; - template<typename... _Elements> - inline tuple<typename __pa_add_rvalue_reference<_Elements>::__type...> - pack_arguments(_Elements&&... __args) - { - typedef tuple<typename __pa_add_rvalue_reference<_Elements>::__type...> - __result_type; - return __result_type(std::forward<_Elements>(__args)...); - } + inline tuple<_Elements&&...> + forward_as_tuple(_Elements&&... __args) + { return tuple<_Elements&&...>(std::forward<_Elements>(__args)...); } template<std::size_t...> struct __index_holder { }; |