Message ID | CAFk2RUZUuPOXLOmMD9zoTo1P6ZuhTWuFd41w3eUJvCYhvwi+yQ@mail.gmail.com |
---|---|
State | New |
Headers | show |
On 14/08/16 21:27 +0300, Ville Voutilainen wrote: >Here. Tested on Linux-x64. I made the test for the macro value compare >it relatively rather than exactly; >I don't think our tests should necessarily break just because a macro >value is updated. > >2016-08-14 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. > * testsuite/20_util/tuple/make_from_tuple/1.cc: Adjust. OK, thanks.
diff --git a/libstdc++-v3/include/std/tuple b/libstdc++-v3/include/std/tuple index 3403048..5ad171f 100644 --- a/libstdc++-v3/include/std/tuple +++ b/libstdc++-v3/include/std/tuple @@ -1656,6 +1656,8 @@ _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...>) diff --git a/libstdc++-v3/testsuite/20_util/tuple/make_from_tuple/1.cc b/libstdc++-v3/testsuite/20_util/tuple/make_from_tuple/1.cc index 459dc74..17aca31 100644 --- a/libstdc++-v3/testsuite/20_util/tuple/make_from_tuple/1.cc +++ b/libstdc++-v3/testsuite/20_util/tuple/make_from_tuple/1.cc @@ -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 {