Commit 24299f65 by Ville Voutilainen Committed by Ville Voutilainen

Add a feature macro for C++17 make_from_tuple.

	* include/std/tuple (__cpp_lib_make_from_tuple): New.
	* testsuite/20_util/tuple/make_from_tuple/1.cc: Adjust.

From-SVN: r239480
parent 0657379e
2016-08-15 Ville Voutilainen <ville.voutilainen@gmail.com>
Add a feature macro for C++17 make_from_tuple.
* include/std/tuple (__cpp_lib_make_from_tuple): New.
(__make_from_tuple_impl(_Tuple&&, index_sequence<_Idx...>)):
Qualify the call to get<>().
* testsuite/20_util/tuple/make_from_tuple/1.cc: Adjust.
2016-08-15 Uros Bizjak <ubizjak@gmail.com>
* src/filesystem/ops.cc: Always include ostream and
......
......@@ -1656,10 +1656,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_Indices{});
}
#define __cpp_lib_make_from_tuple 201606
template <typename _Tp, typename _Tuple, size_t... _Idx>
constexpr _Tp
__make_from_tuple_impl(_Tuple&& __t, index_sequence<_Idx...>)
{ return _Tp(get<_Idx>(std::forward<_Tuple>(__t))...); }
{ return _Tp(std::get<_Idx>(std::forward<_Tuple>(__t))...); }
template <typename _Tp, typename _Tuple>
constexpr _Tp
......
......@@ -20,6 +20,12 @@
#include <tuple>
#include <testsuite_hooks.h>
#ifndef __cpp_lib_make_from_tuple
# error "Feature-test macro for make_from_tuple missing."
#elif __cpp_lib_make_from_tuple < 201606
# error "Feature-test macro for make_from_tuple has the wrong value."
#endif
template <class T, class U, class V>
struct ThreeParam
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment