From: Jonathan Wakely Date: Wed, 22 Apr 2020 21:54:34 +0000 (+0100) Subject: libstdc++: Update value of __cpp_lib_jthread macro X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aa12ab2e93b6fd7c0c5292504b0bbe2dd304e5ed;p=gcc.git libstdc++: Update value of __cpp_lib_jthread macro * include/std/condition_variable (__cpp_lib_jthread): Remove redundant definition. * include/std/stop_token (__cpp_lib_jthread): Update macro value to indicate P1869R1 support. * include/std/version (__cpp_lib_jthread): Update value. * testsuite/30_threads/condition_variable_any/stop_token/1.cc: Check for updated macro value. * testsuite/30_threads/condition_variable_any/stop_token/2.cc: Likewise. * testsuite/30_threads/jthread/1.cc: Likewise. * testsuite/30_threads/jthread/2.cc: Likewise. * testsuite/30_threads/stop_token/1.cc: Likewise. * testsuite/30_threads/stop_token/2.cc: Likewise. --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 2e1484fefb5..dc0b1eecfb0 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,19 @@ 2020-04-22 Jonathan Wakely + * include/std/condition_variable (__cpp_lib_jthread): Remove + redundant definition. + * include/std/stop_token (__cpp_lib_jthread): Update macro value to + indicate P1869R1 support. + * include/std/version (__cpp_lib_jthread): Update value. + * testsuite/30_threads/condition_variable_any/stop_token/1.cc: Check + for updated macro value. + * testsuite/30_threads/condition_variable_any/stop_token/2.cc: + Likewise. + * testsuite/30_threads/jthread/1.cc: Likewise. + * testsuite/30_threads/jthread/2.cc: Likewise. + * testsuite/30_threads/stop_token/1.cc: Likewise. + * testsuite/30_threads/stop_token/2.cc: Likewise. + * testsuite/21_strings/basic_string/erasure.cc: Check for __cpp_lib_erase_if macro. * testsuite/23_containers/deque/erasure.cc: Add header name to #error diff --git a/libstdc++-v3/include/std/condition_variable b/libstdc++-v3/include/std/condition_variable index cc7f99f6921..2db9dff6c31 100644 --- a/libstdc++-v3/include/std/condition_variable +++ b/libstdc++-v3/include/std/condition_variable @@ -47,8 +47,7 @@ #include #if __cplusplus > 201703L -#define __cpp_lib_jthread 201907L -#include +# include #endif #if defined(_GLIBCXX_HAS_GTHREADS) diff --git a/libstdc++-v3/include/std/stop_token b/libstdc++-v3/include/std/stop_token index 87beb08c71d..847d12f7454 100644 --- a/libstdc++-v3/include/std/stop_token +++ b/libstdc++-v3/include/std/stop_token @@ -34,7 +34,7 @@ #include #ifdef _GLIBCXX_HAS_GTHREADS -# define __cpp_lib_jthread 201907L +# define __cpp_lib_jthread 201911L # include # if __has_include() # include diff --git a/libstdc++-v3/include/std/version b/libstdc++-v3/include/std/version index 6d7dcc46023..dafb09f982a 100644 --- a/libstdc++-v3/include/std/version +++ b/libstdc++-v3/include/std/version @@ -191,7 +191,7 @@ #define __cpp_lib_erase_if 202002L #define __cpp_lib_interpolate 201902L #ifdef _GLIBCXX_HAS_GTHREADS -# define __cpp_lib_jthread 201907L +# define __cpp_lib_jthread 201911L #endif #define __cpp_lib_list_remove_return_type 201806L #define __cpp_lib_math_constants 201907L diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable_any/stop_token/1.cc b/libstdc++-v3/testsuite/30_threads/condition_variable_any/stop_token/1.cc index 59dafeb2d86..5b71cfb979f 100644 --- a/libstdc++-v3/testsuite/30_threads/condition_variable_any/stop_token/1.cc +++ b/libstdc++-v3/testsuite/30_threads/condition_variable_any/stop_token/1.cc @@ -22,6 +22,6 @@ #ifndef __cpp_lib_jthread # error "Feature-test macro for jthread missing in " -#elif __cpp_lib_jthread != 201907L +#elif __cpp_lib_jthread != 201911L # error "Feature-test macro for jthread has wrong value in " #endif diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable_any/stop_token/2.cc b/libstdc++-v3/testsuite/30_threads/condition_variable_any/stop_token/2.cc index 7254024bbb3..0f017e43996 100644 --- a/libstdc++-v3/testsuite/30_threads/condition_variable_any/stop_token/2.cc +++ b/libstdc++-v3/testsuite/30_threads/condition_variable_any/stop_token/2.cc @@ -22,6 +22,6 @@ #ifndef __cpp_lib_jthread # error "Feature-test macro for jthread missing in " -#elif __cpp_lib_jthread != 201907L +#elif __cpp_lib_jthread != 201911L # error "Feature-test macro for jthread has wrong value in " #endif diff --git a/libstdc++-v3/testsuite/30_threads/jthread/1.cc b/libstdc++-v3/testsuite/30_threads/jthread/1.cc index dc47df9d205..d7c0a836b8b 100644 --- a/libstdc++-v3/testsuite/30_threads/jthread/1.cc +++ b/libstdc++-v3/testsuite/30_threads/jthread/1.cc @@ -23,6 +23,6 @@ #ifndef __cpp_lib_jthread # error "Feature-test macro for jthread missing in " -#elif __cpp_lib_jthread != 201907L +#elif __cpp_lib_jthread != 201911L # error "Feature-test macro for jthread has wrong value in " #endif diff --git a/libstdc++-v3/testsuite/30_threads/jthread/2.cc b/libstdc++-v3/testsuite/30_threads/jthread/2.cc index 9a0abbe8f70..4c196c3fe92 100644 --- a/libstdc++-v3/testsuite/30_threads/jthread/2.cc +++ b/libstdc++-v3/testsuite/30_threads/jthread/2.cc @@ -23,6 +23,6 @@ #ifndef __cpp_lib_jthread # error "Feature-test macro for jthread missing in " -#elif __cpp_lib_jthread != 201907L +#elif __cpp_lib_jthread != 201911L # error "Feature-test macro for jthread has wrong value in " #endif diff --git a/libstdc++-v3/testsuite/30_threads/stop_token/1.cc b/libstdc++-v3/testsuite/30_threads/stop_token/1.cc index 19294552fce..fffff3740c5 100644 --- a/libstdc++-v3/testsuite/30_threads/stop_token/1.cc +++ b/libstdc++-v3/testsuite/30_threads/stop_token/1.cc @@ -22,6 +22,6 @@ #ifndef __cpp_lib_jthread # error "Feature-test macro for jthread missing in " -#elif __cpp_lib_jthread != 201907L +#elif __cpp_lib_jthread != 201911L # error "Feature-test macro for jthread has wrong value in " #endif diff --git a/libstdc++-v3/testsuite/30_threads/stop_token/2.cc b/libstdc++-v3/testsuite/30_threads/stop_token/2.cc index 7254024bbb3..0f017e43996 100644 --- a/libstdc++-v3/testsuite/30_threads/stop_token/2.cc +++ b/libstdc++-v3/testsuite/30_threads/stop_token/2.cc @@ -22,6 +22,6 @@ #ifndef __cpp_lib_jthread # error "Feature-test macro for jthread missing in " -#elif __cpp_lib_jthread != 201907L +#elif __cpp_lib_jthread != 201911L # error "Feature-test macro for jthread has wrong value in " #endif