mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-15 07:13:02 +00:00
c++: check that emplace for rvalues works
See the previous commit. * tests/local.at (AT_REQUIRE_CXX_VERSION): New. * tests/types.at (api.value.type): Check emplace in C++14.
This commit is contained in:
@@ -138,7 +138,7 @@ m4_define([AT_BISON_OPTION_PUSHDEFS],
|
||||
# This sucks hard, GNU M4 should really provide M5-like $$1.
|
||||
m4_define([_AT_BISON_OPTION_PUSHDEFS],
|
||||
[m4_if([$1$2], $[1]$[2], [],
|
||||
[m4_fatal([$0: Invalid arguments: $@])])dnl
|
||||
[m4_fatal([$0: invalid arguments: $@])])dnl
|
||||
m4_pushdef([AT_AUTOMOVE_IF],
|
||||
[m4_bmatch([$3], [%define api\.value\.automove], [$1], [$2])])
|
||||
m4_pushdef([AT_DEFINES_IF],
|
||||
@@ -904,6 +904,33 @@ AT_PARSER_CHECK([./c-and-cxx])
|
||||
])
|
||||
|
||||
|
||||
# AT_REQUIRE_CXX_VERSION(STD)
|
||||
# ---------------------------
|
||||
# Skip unless this compiler supports at least C++ STD (e.g., "11",
|
||||
# "14", etc.).
|
||||
m4_define([AT_REQUIRE_CXX_VERSION],
|
||||
[AT_DATA([check.cc],
|
||||
[[int main ()
|
||||
{
|
||||
#if __cplusplus < ]m4_case([$1],
|
||||
[98], [199711],
|
||||
[03], [199711],
|
||||
[11], [201103],
|
||||
[14], [201402],
|
||||
[17], [201703],
|
||||
[2a], [201709],
|
||||
[m4_fatal([$0: invalid arguments: $@])])[
|
||||
return 77;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
]])
|
||||
AT_COMPILE_CXX([check])
|
||||
AT_CHECK([@&t@./check])
|
||||
])
|
||||
|
||||
|
||||
# AT_SKIP_IF_EXCEPTION_SUPPORT_IS_POOR
|
||||
# ------------------------------------
|
||||
# Check that we can expect exceptions to be handled properly.
|
||||
|
||||
Reference in New Issue
Block a user