]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/20_util/duration/arithmetic/constexpr_c++17.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 20_util / duration / arithmetic / constexpr_c++17.cc
index 438d50afddfb2d14f9604e488e46a0847a63d0fc..6a19ddf95da77c96cd00a44b842696056704bb18 100644 (file)
@@ -1,7 +1,7 @@
-// { dg-options "-std=gnu++17" }
 // { dg-do compile { target c++17 } }
+// { dg-add-options no_pch }
 
-// Copyright (C) 2011-2017 Free Software Foundation, Inc.
+// Copyright (C) 2011-2024 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
 
 #include <chrono>
 #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()
 {
   std::chrono::nanoseconds d1 { 1 };