Commit 285ee2fb by Jonathan Wakely Committed by Jonathan Wakely

Fix ambiguities in C++17 mode

	* include/experimental/tuple (apply): Qualify call to __apply_impl.
	* include/std/tuple (apply): Likewise.
	* testsuite/experimental/system_error/value.cc: Fix ambiguities in
	C++17 mode.
	* testsuite/experimental/tuple/tuple_size.cc: Likewise.
	* testsuite/experimental/type_traits/value.cc: Likewise.

From-SVN: r239621
parent 1cad9284
2016-08-19 Jonathan Wakely <jwakely@redhat.com> 2016-08-19 Jonathan Wakely <jwakely@redhat.com>
* include/experimental/tuple (apply): Qualify call to __apply_impl.
* include/std/tuple (apply): Likewise.
* testsuite/experimental/system_error/value.cc: Fix ambiguities in
C++17 mode.
* testsuite/experimental/tuple/tuple_size.cc: Likewise.
* testsuite/experimental/type_traits/value.cc: Likewise.
* doc/xml/manual/status_cxx2017.xml: Update status of make_from_tuple * doc/xml/manual/status_cxx2017.xml: Update status of make_from_tuple
and variant. and variant.
* doc/html/*: Regenerate. * doc/html/*: Regenerate.
......
...@@ -66,7 +66,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -66,7 +66,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ {
using _Indices = using _Indices =
std::make_index_sequence<tuple_size_v<std::decay_t<_Tuple>>>; std::make_index_sequence<tuple_size_v<std::decay_t<_Tuple>>>;
return __apply_impl(std::forward<_Fn>(__f), std::forward<_Tuple>(__t), return experimental::__apply_impl(std::forward<_Fn>(__f),
std::forward<_Tuple>(__t),
_Indices{}); _Indices{});
} }
......
...@@ -1652,7 +1652,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -1652,7 +1652,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
apply(_Fn&& __f, _Tuple&& __t) apply(_Fn&& __f, _Tuple&& __t)
{ {
using _Indices = make_index_sequence<tuple_size_v<decay_t<_Tuple>>>; using _Indices = make_index_sequence<tuple_size_v<decay_t<_Tuple>>>;
return __apply_impl(std::forward<_Fn>(__f), std::forward<_Tuple>(__t), return std::__apply_impl(std::forward<_Fn>(__f),
std::forward<_Tuple>(__t),
_Indices{}); _Indices{});
} }
......
...@@ -20,21 +20,23 @@ ...@@ -20,21 +20,23 @@
#include <experimental/system_error> #include <experimental/system_error>
#include <future> #include <future>
using namespace std; using std::is_error_code_enum;
using namespace std::experimental; using std::is_error_condition_enum;
using std::experimental::is_error_code_enum_v;
using std::experimental::is_error_condition_enum_v;
// These tests are rather simple, the front-end tests already test // These tests are rather simple, the front-end tests already test
// variable templates, and the library tests for the underlying // variable templates, and the library tests for the underlying
// traits are more elaborate. These are just simple sanity tests. // traits are more elaborate. These are just simple sanity tests.
static_assert(is_error_code_enum_v<future_errc> static_assert(is_error_code_enum_v<std::future_errc>
&& is_error_code_enum<future_errc>::value, ""); && is_error_code_enum<std::future_errc>::value, "");
static_assert(!is_error_code_enum_v<int> static_assert(!is_error_code_enum_v<int>
&& !is_error_code_enum<int>::value, ""); && !is_error_code_enum<int>::value, "");
static_assert(is_error_condition_enum_v<errc> static_assert(is_error_condition_enum_v<std::errc>
&& is_error_condition_enum<errc>::value, ""); && is_error_condition_enum<std::errc>::value, "");
static_assert(!is_error_condition_enum_v<int> static_assert(!is_error_condition_enum_v<int>
&& !is_error_condition_enum<int>::value, ""); && !is_error_condition_enum<int>::value, "");
...@@ -20,8 +20,9 @@ ...@@ -20,8 +20,9 @@
#include <experimental/tuple> #include <experimental/tuple>
using namespace std; using std::tuple;
using namespace std::experimental; using std::tuple_size;
using std::experimental::tuple_size_v;
// These tests are rather simple, the front-end tests already test // These tests are rather simple, the front-end tests already test
// variable templates, and the library tests for the underlying // variable templates, and the library tests for the underlying
......
...@@ -20,8 +20,74 @@ ...@@ -20,8 +20,74 @@
#include <experimental/type_traits> #include <experimental/type_traits>
using namespace std; using std::true_type;
using namespace experimental; using std::false_type;
using std::nullptr_t;
using std::is_void;
using std::is_null_pointer;
using std::is_integral;
using std::is_floating_point;
using std::is_array;
using std::is_pointer;
using std::is_lvalue_reference;
using std::is_rvalue_reference;
using std::is_member_object_pointer;
using std::is_member_function_pointer;
using std::is_enum;
using std::is_union;
using std::is_class;
using std::is_function;
using std::is_reference;
using std::is_arithmetic;
using std::is_fundamental;
using std::is_object;
using std::is_scalar;
using std::is_compound;
using std::is_member_pointer;
using std::is_const;
using std::is_volatile;
using std::is_trivial;
using std::is_trivially_copyable;
using std::is_standard_layout;
using std::is_pod;
using std::is_literal_type;
using std::is_empty;
using std::is_polymorphic;
using std::is_abstract;
using std::is_final;
using std::is_signed;
using std::is_constructible;
using std::is_default_constructible;
using std::is_copy_constructible;
using std::is_move_constructible;
using std::is_assignable;
using std::is_copy_assignable;
using std::is_move_assignable;
using std::is_destructible;
using std::is_trivially_constructible;
using std::is_trivially_default_constructible;
using std::is_trivially_copy_constructible;
using std::is_trivially_move_constructible;
using std::is_trivially_assignable;
using std::is_trivially_copy_assignable;
using std::is_trivially_move_assignable;
using std::is_trivially_destructible;
using std::is_nothrow_constructible;
using std::is_nothrow_default_constructible;
using std::is_nothrow_copy_constructible;
using std::is_nothrow_move_constructible;
using std::is_nothrow_assignable;
using std::is_nothrow_copy_assignable;
using std::is_nothrow_move_assignable;
using std::is_nothrow_destructible;
using std::has_virtual_destructor;
using std::alignment_of;
using std::rank;
using std::extent;
using std::is_same;
using std::is_base_of;
using std::is_convertible;
using namespace std::experimental;
// These tests are rather simple, the front-end tests already test // These tests are rather simple, the front-end tests already test
// variable templates, and the library tests for the underlying // variable templates, and the library tests for the underlying
......
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