libstdc++-v3/ChangeLog:
* testsuite/20_util/function_objects/invoke/3.cc: Check feature
test macro.
* testsuite/20_util/function_objects/invoke/version.cc: New test.
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++17" }
// { dg-do compile { target c++17 } }
#include <functional>
+#ifndef __cpp_lib_invoke
+# error Feature-test macro for invoke is missing in <functional>
+#elif __cpp_lib_invoke < 201411L
+# error Feature-test macro for invoke has the wrong value in <functional>
+#endif
+
struct abstract {
virtual ~abstract() = 0;
void operator()() noexcept;
--- /dev/null
+// { dg-do compile { target c++17 } }
+
+#include <version>
+
+#ifndef __cpp_lib_invoke
+# error Feature-test macro for invoke is missing in <version>
+#elif __cpp_lib_invoke < 201411L
+# error Feature-test macro for invoke has the wrong value in <version>
+#endif