Fix ambiguities in C++17 mode
authorJonathan Wakely <jwakely@redhat.com>
Fri, 19 Aug 2016 15:42:11 +0000 (16:42 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 19 Aug 2016 15:42:11 +0000 (16:42 +0100)
* 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

libstdc++-v3/ChangeLog
libstdc++-v3/include/experimental/tuple
libstdc++-v3/include/std/tuple
libstdc++-v3/testsuite/experimental/system_error/value.cc
libstdc++-v3/testsuite/experimental/tuple/tuple_size.cc
libstdc++-v3/testsuite/experimental/type_traits/value.cc

index edcb835029c8945fa4000c27a8c17af943937da9..2a3e6947304c6fe4a43b6a215f404bb04cc0be81 100644 (file)
@@ -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.
index bfa1ed18f9e1581e0c58c7c78209882883969531..b653ea72e2a853ffa7e73675b4e63edb3797f691 100644 (file)
@@ -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
index 29db833e70007e03033620c4b42daf34c96dffb0..c06a040a960995d18da4531a46757460c7ffc55f 100644 (file)
@@ -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
index ee792cbdae679ccfbd13dac76bf6b6a64a9706da..3b346ce95fb1cea8542c167fc45d4f092b617b20 100644 (file)
 
 #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, "");
index 953d3b2fb4a95f4aae099db762bf2ac2146c3f31..e9a49ea037b1abd71c2832b339b20d9d7e69e95a 100644 (file)
@@ -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
index 16b63cbf47ba8e2a5b049b51b89d813653aafc34..6a7a95dc5e14ac691f8efb08452165bca86fa9ba 100644 (file)
 
 #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