coroutines, libstdc++-v3: Update to n4861 C++20 DIS.
authorIain Sandoe <iain@sandoe.co.uk>
Thu, 23 Apr 2020 14:36:29 +0000 (15:36 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Thu, 23 Apr 2020 15:27:29 +0000 (16:27 +0100)
Update the inline namespace to __n4861.
Add '__cpp_lib_coroutine' defined to 201902L per n4861.

libstdc++-v3/ChangeLog:

2020-04-23  Iain Sandoe  <iain@sandoe.co.uk>

* include/std/coroutine: Update the inline namespace to __n4861.
Add the __cpp_lib_coroutine define, set to 201902L.
* include/std/version: Add __cpp_lib_coroutine, set to 201902L.

gcc/testsuite/ChangeLog:

2020-04-23  Iain Sandoe  <iain@sandoe.co.uk>

* g++.dg/coroutines/coro-bad-alloc-00-bad-op-new.C: Adjust for
changed inline namespace.
* g++.dg/coroutines/coro-bad-alloc-01-bad-op-del.C: Likewise.
* g++.dg/coroutines/coro-bad-alloc-02-no-op-new-nt.C: Likewise
* g++.dg/coroutines/coro.h: Likewise

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/coroutines/coro-bad-alloc-00-bad-op-new.C
gcc/testsuite/g++.dg/coroutines/coro-bad-alloc-01-bad-op-del.C
gcc/testsuite/g++.dg/coroutines/coro-bad-alloc-02-no-op-new-nt.C
gcc/testsuite/g++.dg/coroutines/coro.h
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/coroutine
libstdc++-v3/include/std/version

index 15e7d9e..cb21f55 100644 (file)
@@ -1,3 +1,11 @@
+2020-04-23 Iain Sandoe <iain@sandoe.co.uk>
+
+       * g++.dg/coroutines/coro-bad-alloc-00-bad-op-new.C: Adjust for
+       changed inline namespace.
+       * g++.dg/coroutines/coro-bad-alloc-01-bad-op-del.C: Likewise.
+       * g++.dg/coroutines/coro-bad-alloc-02-no-op-new-nt.C: Likewise
+       * g++.dg/coroutines/coro.h: Likewise
+
 2020-04-23  Szabolcs Nagy  <szabolcs.nagy@arm.com>
 
        PR target/94697
index 1fdce1d..06543a9 100644 (file)
@@ -6,7 +6,7 @@
 #include "coro1-allocators.h"
 
 struct coro1
-f ()  /* { dg-error {'operator new' is provided by 'std::__n4835::coroutine_traits<coro1>::promise_type' \{aka 'coro1::promise_type'\} but is not usable with the function signature 'coro1 f\(\)'} } */
+f ()  /* { dg-error {'operator new' is provided by 'std::__n4861::coroutine_traits<coro1>::promise_type' \{aka 'coro1::promise_type'\} but is not usable with the function signature 'coro1 f\(\)'} } */
 {
   co_return;
 }
index be80479..9a4ec34 100644 (file)
@@ -6,7 +6,7 @@
 #include "coro1-allocators.h"
 
 struct coro1
-f ()  /* { dg-error {'operator delete' is provided by 'std::__n4835::coroutine_traits<coro1>::promise_type' \{aka 'coro1::promise_type'\} but is not usable with the function signature 'coro1 f\(\)'} } */
+f ()  /* { dg-error {'operator delete' is provided by 'std::__n4861::coroutine_traits<coro1>::promise_type' \{aka 'coro1::promise_type'\} but is not usable with the function signature 'coro1 f\(\)'} } */
 {
   co_return;
 }
index eae2dad..c0c0792 100644 (file)
@@ -9,7 +9,7 @@
 #include "coro1-allocators.h"
 
 struct coro1
-f () /* { dg-error {'coro1::promise_type::get_return_object_on_allocation_failure\(\)\(\)' is provided by 'std::__n4835::coroutine_traits<coro1>::promise_type' \{aka 'coro1::promise_type'\} but 'operator new' is not marked 'throw\(\)' or 'noexcept'} } */
+f () /* { dg-error {'coro1::promise_type::get_return_object_on_allocation_failure\(\)\(\)' is provided by 'std::__n4861::coroutine_traits<coro1>::promise_type' \{aka 'coro1::promise_type'\} but 'operator new' is not marked 'throw\(\)' or 'noexcept'} } */
 {
   co_return;
 }
index a1bd38b..fccfe41 100644 (file)
@@ -32,7 +32,7 @@ namespace coro = std::experimental;
 #  if __cpp_impl_coroutine
 
 namespace std {
-inline namespace __n4835 {
+inline namespace __n4861 {
 
 // 21.11.1 coroutine traits
 template<typename _R, typename...> struct coroutine_traits {
@@ -125,7 +125,7 @@ struct suspend_never {
   void await_resume() {}
 };
 
-} // namespace __n4835
+} // namespace __n4861
 } // namespace std
 
 namespace coro = std;
index fb0c1ac..b5dc52c 100644 (file)
@@ -1,3 +1,9 @@
+2020-04-23  Iain Sandoe  <iain@sandoe.co.uk>
+
+       * include/std/coroutine: Update the inline namespace to __n4861.
+       Add the __cpp_lib_coroutine define, set to 201902L.
+       * include/std/version: Add __cpp_lib_coroutine, set to 201902L.
+
 2020-04-22  Jonathan Wakely  <jwakely@redhat.com>
 
        * include/std/execution (__cpp_lib_execution): Define to indicate
index 2e45c45..4fa1355 100644 (file)
 
 namespace std _GLIBCXX_VISIBILITY (default)
 {
-  _GLIBCXX_BEGIN_NAMESPACE_VERSION
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
 
 #if __cpp_impl_coroutine
-  inline namespace __n4835 {
+
+#define __cpp_lib_coroutine 201902L
+
+  inline namespace __n4861 {
 
   // 17.12.2 coroutine traits
   /// [coroutine.traits]
@@ -277,7 +280,7 @@ namespace std _GLIBCXX_VISIBILITY (default)
     void await_resume() {}
   };
 
-  } // namespace __n4835
+  } // namespace __n4861
 
 #else
 #error "the coroutine header requires -fcoroutines"
index 3024f1c..d06d60c 100644 (file)
@@ -69,6 +69,9 @@
 
 #if __cplusplus >= 201402L
 // c++14
+#if __cpp_impl_coroutine
+# define __cpp_lib_coroutine 201902L
+#endif
 #define __cpp_lib_integral_constant_callable 201304
 #define __cpp_lib_is_final 201402L
 #define __cpp_lib_transformation_trait_aliases 201304