[patch] Add SD-6 features test macros for recent libstdc++ changes

2015-08-13 Thread Jonathan Wakely

Subject says it all.

Tested ppc64le-linux, committing to trunk.


commit d7f997a59a1383b7f08618fbf1d7855edb5fa012
Author: Jonathan Wakely 
Date:   Thu Aug 13 10:27:59 2015 +0100

	* include/bits/alloc_traits.h: Add feature-test macro.
	* include/bits/allocator.h: Likewise.
	* include/bits/range_access.h: Likewise.
	* include/bits/stl_map.h: Likewise.
	* include/bits/unordered_map.h: Likewise.

diff --git a/libstdc++-v3/include/bits/alloc_traits.h b/libstdc++-v3/include/bits/alloc_traits.h
index e5ed92b..565b89b 100644
--- a/libstdc++-v3/include/bits/alloc_traits.h
+++ b/libstdc++-v3/include/bits/alloc_traits.h
@@ -36,6 +36,8 @@
 #include 
 #include 
 
+#define __cpp_lib_allocator_traits_is_always_equal 201411
+
 namespace std _GLIBCXX_VISIBILITY(default)
 {
 _GLIBCXX_BEGIN_NAMESPACE_VERSION
diff --git a/libstdc++-v3/include/bits/allocator.h b/libstdc++-v3/include/bits/allocator.h
index c7a2503..6fd3214 100644
--- a/libstdc++-v3/include/bits/allocator.h
+++ b/libstdc++-v3/include/bits/allocator.h
@@ -78,6 +78,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   // 2103. std::allocator propagate_on_container_move_assignment
   typedef true_type propagate_on_container_move_assignment;
 
+#define __cpp_lib_allocator_is_always_equal 201411
   typedef true_type is_always_equal;
 #endif
 };
diff --git a/libstdc++-v3/include/bits/range_access.h b/libstdc++-v3/include/bits/range_access.h
index 586d162..aa78afb 100644
--- a/libstdc++-v3/include/bits/range_access.h
+++ b/libstdc++-v3/include/bits/range_access.h
@@ -223,6 +223,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 #endif // C++14
 
 #if __cplusplus > 201402L
+#define __cpp_lib_nonmember_container_access 201411
 
   /**
*  @brief  Return the size of a container.
diff --git a/libstdc++-v3/include/bits/stl_map.h b/libstdc++-v3/include/bits/stl_map.h
index 68ab6da..dff9f9c 100644
--- a/libstdc++-v3/include/bits/stl_map.h
+++ b/libstdc++-v3/include/bits/stl_map.h
@@ -591,7 +591,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
 	 std::forward<_Args>(__args)...);
 	}
 #endif
+
 #if __cplusplus > 201402L
+#define __cpp_lib_map_try_emplace 201411
   /**
*  @brief Attempts to build and insert a std::pair into the %map.
*
@@ -708,6 +710,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
   return __i;
 }
 #endif
+
   /**
*  @brief Attempts to insert a std::pair into the %map.
 
@@ -805,6 +808,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
 { _M_t._M_insert_unique(__first, __last); }
 
 #if __cplusplus > 201402L
+#define __cpp_lib_map_insertion 201411
   /**
*  @brief Attempts to insert or assign a std::pair into the %map.
*  @param __kKey to use for finding a possibly existing pair in
diff --git a/libstdc++-v3/include/bits/unordered_map.h b/libstdc++-v3/include/bits/unordered_map.h
index 15d4b8b..1b90459 100644
--- a/libstdc++-v3/include/bits/unordered_map.h
+++ b/libstdc++-v3/include/bits/unordered_map.h
@@ -412,6 +412,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
 
 
 #if __cplusplus > 201402L
+#define __cpp_lib_unordered_map_try_emplace 201411
   /**
*  @brief Attempts to build and insert a std::pair into the
*  %unordered_map.
@@ -617,6 +618,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
 
 
 #if __cplusplus > 201402L
+#define __cpp_lib_unordered_map_insertion 201411
   /**
*  @brief Attempts to insert a std::pair into the %unordered_map.
*  @param __kKey to use for finding a possibly existing pair in



Re: [patch] Add SD-6 features test macros for recent libstdc++ changes

2015-08-14 Thread Jonathan Wakely

And another one. Committed to trunk.
commit 6c9731439357e2a385b16ad6521c05776ecf0562
Author: Jonathan Wakely 
Date:   Thu Aug 13 16:11:43 2015 +0100

	* include/experimental/array: Add feature-test macro.
	* testsuite/experimental/array/neg.cc: Update dg-error.

diff --git a/libstdc++-v3/include/experimental/array b/libstdc++-v3/include/experimental/array
index a6e983a..9617481 100644
--- a/libstdc++-v3/include/experimental/array
+++ b/libstdc++-v3/include/experimental/array
@@ -47,6 +47,7 @@ inline namespace fundamentals_v2
 {
 _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
+#define __cpp_lib_experimental_make_array 201505
   /**
* @defgroup make_array Array creation functions
* @ingroup experimental
diff --git a/libstdc++-v3/testsuite/experimental/array/neg.cc b/libstdc++-v3/testsuite/experimental/array/neg.cc
index df532d1..5db2a18 100644
--- a/libstdc++-v3/testsuite/experimental/array/neg.cc
+++ b/libstdc++-v3/testsuite/experimental/array/neg.cc
@@ -24,5 +24,5 @@ int main()
 {
   int dummy;
   auto bad = std::experimental::make_array(std::ref(dummy));
-  // { dg-error "make_array cannot be used without an explicit target type if any of the types given is a reference_wrapper" "" { target *-*-* } 76 }
+  // { dg-error "make_array cannot be used without an explicit target type if any of the types given is a reference_wrapper" "" { target *-*-* } 77 }
 }