glr2.cc: require C++11

Reported by Dagobert Michelsen.
https://lists.gnu.org/r/bug-bison/2021-08/msg00006.html

* m4/bison-cxx-std.m4 (_BISON_CXXSTD_98_snippet): We don't need
vector::data, it was only for glr2.cc, which is C++11 anyway.
(_BISON_CXXSTD_11_snippet): We need vector::data and std::swap on
arrays.
* m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): We don't need
vector::data.
* tests/local.at (AT_COMPILE_CXX): Skip when glr2.cc and no support
for C++11.
This commit is contained in:
Akim Demaille
2021-08-17 12:53:09 +02:00
parent f2c568d3ef
commit 36f37568ba
6 changed files with 32 additions and 29 deletions

View File

@@ -1370,7 +1370,6 @@ public:
check_ ();
other.check_ ();]])[
std::swap (is_state_, other.is_state_);
// NB: swap on arrays is C++11.
std::swap (raw_, other.raw_);
return *this;
}