libstdc++: Add tests for std::invoke feature test macro
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.
This commit is contained in:
parent
d0d6ca0197
commit
29745bf062
@ -15,11 +15,16 @@
|
||||
// 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;
|
||||
|
@ -0,0 +1,9 @@
|
||||
// { 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
|
Loading…
Reference in New Issue
Block a user