Commit 233fa165 by Jonathan Wakely Committed by Jonathan Wakely

Update value of __cpp_lib_chrono feature-test macro

	* include/std/chrono (__cpp_lib_chrono): Update macro value to
	indicate support for P0505R0.
	* testsuite/20_util/duration/arithmetic/constexpr_c++17.cc: Check
	for updated macro.

From-SVN: r253959
parent af863030
2017-10-20 Jonathan Wakely <jwakely@redhat.com> 2017-10-20 Jonathan Wakely <jwakely@redhat.com>
* include/std/chrono (__cpp_lib_chrono): Update macro value to
indicate support for P0505R0.
* testsuite/20_util/duration/arithmetic/constexpr_c++17.cc: Check
for updated macro.
* include/c_global/cstddef: Define __cpp_lib_byte feature-test macro. * include/c_global/cstddef: Define __cpp_lib_byte feature-test macro.
* testsuite/18_support/byte/requirements.cc: Check macro. * testsuite/18_support/byte/requirements.cc: Check macro.
......
...@@ -214,8 +214,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -214,8 +214,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
treat_as_floating_point<_Rep>::value; treat_as_floating_point<_Rep>::value;
#endif // C++17 #endif // C++17
#if __cplusplus > 201402L #if __cplusplus >= 201703L
# define __cpp_lib_chrono 201510 # define __cpp_lib_chrono 201611
template<typename _ToDur, typename _Rep, typename _Period> template<typename _ToDur, typename _Rep, typename _Period>
constexpr __enable_if_is_duration<_ToDur> constexpr __enable_if_is_duration<_ToDur>
......
...@@ -20,6 +20,13 @@ ...@@ -20,6 +20,13 @@
#include <chrono> #include <chrono>
#include <testsuite_common_types.h> #include <testsuite_common_types.h>
#ifndef __cpp_lib_chrono
# error "Feature-test macro for constexpr <chrono> missing"
#elif __cpp_lib_chrono != 201611
# error "Feature-test macro for constexpr <chrono> has wrong value"
#endif
constexpr auto test_operators() constexpr auto test_operators()
{ {
std::chrono::nanoseconds d1 { 1 }; std::chrono::nanoseconds d1 { 1 };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment