aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2016-08-19 16:42:11 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2016-08-19 16:42:11 +0100
commit285ee2fb11d392e2991f5307e959faac5a8f0bce (patch)
tree574e5512f82d483440a03f0193a4e9a38e80c839
parent1cad92845380a2175e70f5d6772d172f5c334201 (diff)
downloadgcc-285ee2fb11d392e2991f5307e959faac5a8f0bce.zip
gcc-285ee2fb11d392e2991f5307e959faac5a8f0bce.tar.gz
gcc-285ee2fb11d392e2991f5307e959faac5a8f0bce.tar.bz2
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
-rw-r--r--libstdc++-v3/ChangeLog7
-rw-r--r--libstdc++-v3/include/experimental/tuple5
-rw-r--r--libstdc++-v3/include/std/tuple5
-rw-r--r--libstdc++-v3/testsuite/experimental/system_error/value.cc14
-rw-r--r--libstdc++-v3/testsuite/experimental/tuple/tuple_size.cc5
-rw-r--r--libstdc++-v3/testsuite/experimental/type_traits/value.cc70
6 files changed, 92 insertions, 14 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index edcb835..2a3e694 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,12 @@
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
and variant.
* doc/html/*: Regenerate.
diff --git a/libstdc++-v3/include/experimental/tuple b/libstdc++-v3/include/experimental/tuple
index bfa1ed1..b653ea7 100644
--- a/libstdc++-v3/include/experimental/tuple
+++ b/libstdc++-v3/include/experimental/tuple
@@ -66,8 +66,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
using _Indices =
std::make_index_sequence<tuple_size_v<std::decay_t<_Tuple>>>;
- return __apply_impl(std::forward<_Fn>(__f), std::forward<_Tuple>(__t),
- _Indices{});
+ return experimental::__apply_impl(std::forward<_Fn>(__f),
+ std::forward<_Tuple>(__t),
+ _Indices{});
}
_GLIBCXX_END_NAMESPACE_VERSION
diff --git a/libstdc++-v3/include/std/tuple b/libstdc++-v3/include/std/tuple
index 29db833..c06a040 100644
--- a/libstdc++-v3/include/std/tuple
+++ b/libstdc++-v3/include/std/tuple
@@ -1652,8 +1652,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
apply(_Fn&& __f, _Tuple&& __t)
{
using _Indices = make_index_sequence<tuple_size_v<decay_t<_Tuple>>>;
- return __apply_impl(std::forward<_Fn>(__f), std::forward<_Tuple>(__t),
- _Indices{});
+ return std::__apply_impl(std::forward<_Fn>(__f),
+ std::forward<_Tuple>(__t),
+ _Indices{});
}
#define __cpp_lib_make_from_tuple 201606
diff --git a/libstdc++-v3/testsuite/experimental/system_error/value.cc b/libstdc++-v3/testsuite/experimental/system_error/value.cc
index ee792cb..3b346ce 100644
--- a/libstdc++-v3/testsuite/experimental/system_error/value.cc
+++ b/libstdc++-v3/testsuite/experimental/system_error/value.cc
@@ -20,21 +20,23 @@
#include <experimental/system_error>
#include <future>
-using namespace std;
-using namespace std::experimental;
+using std::is_error_code_enum;
+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
// variable templates, and the library tests for the underlying
// traits are more elaborate. These are just simple sanity tests.
-static_assert(is_error_code_enum_v<future_errc>
- && is_error_code_enum<future_errc>::value, "");
+static_assert(is_error_code_enum_v<std::future_errc>
+ && is_error_code_enum<std::future_errc>::value, "");
static_assert(!is_error_code_enum_v<int>
&& !is_error_code_enum<int>::value, "");
-static_assert(is_error_condition_enum_v<errc>
- && is_error_condition_enum<errc>::value, "");
+static_assert(is_error_condition_enum_v<std::errc>
+ && is_error_condition_enum<std::errc>::value, "");
static_assert(!is_error_condition_enum_v<int>
&& !is_error_condition_enum<int>::value, "");
diff --git a/libstdc++-v3/testsuite/experimental/tuple/tuple_size.cc b/libstdc++-v3/testsuite/experimental/tuple/tuple_size.cc
index 953d3b2..e9a49ea 100644
--- a/libstdc++-v3/testsuite/experimental/tuple/tuple_size.cc
+++ b/libstdc++-v3/testsuite/experimental/tuple/tuple_size.cc
@@ -20,8 +20,9 @@
#include <experimental/tuple>
-using namespace std;
-using namespace std::experimental;
+using std::tuple;
+using std::tuple_size;
+using std::experimental::tuple_size_v;
// These tests are rather simple, the front-end tests already test
// variable templates, and the library tests for the underlying
diff --git a/libstdc++-v3/testsuite/experimental/type_traits/value.cc b/libstdc++-v3/testsuite/experimental/type_traits/value.cc
index 16b63cb..6a7a95d 100644
--- a/libstdc++-v3/testsuite/experimental/type_traits/value.cc
+++ b/libstdc++-v3/testsuite/experimental/type_traits/value.cc
@@ -20,8 +20,74 @@
#include <experimental/type_traits>
-using namespace std;
-using namespace experimental;
+using std::true_type;
+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
// variable templates, and the library tests for the underlying