4

I recently lost several hours of work because of the fact that the libstdc++ version bundled with GCC 4.8 contained an incomplete C++11 <regex> implementation. I'd like to be able to know about missing stdlib features before running into problems like this.

I assumed that because GCC 4.8 supported nearly all of the C++11 language features it also implemented all of the C++11 standard library features.

Where can I check which C++11/14/17 standard library features are available in each libstdc++ release that correspond to GCC releases? The libstdc++ status page appears to only the feature list from the latest release of libstdc++.

user4581301
  • 33,082
  • 7
  • 33
  • 54
phoenix
  • 7,988
  • 6
  • 39
  • 45
  • 2
    https://gcc.gnu.org/projects/cxx-status.html#cxx1z – Galik Apr 27 '17 at 00:17
  • Is there a good reason you cannot upgrade to a newer version of gcc? – Alex Zywicki Apr 27 '17 at 01:13
  • @AlexZywicki A requirement of the software is that it builds on the native CentOS 7 compiler, in this case GCC 4.8.5. But more broadly, even if I moved to a new compiler, I'd still like to know the answer as it applies to, say, C++20 or future language versions. – phoenix Apr 27 '17 at 20:47
  • 1
    @Galik That link (while helpful) doesn't address libstdc++. For example, searching for "regex" doesn't lend any hits, so it wouldn't have helped find this particular problem. – phoenix Apr 27 '17 at 20:49
  • @phoenix is the requirement that it _builds_ with the native CentOS 7 compiler, or just that it only depends on the native CentOS 7 version of `libstdc++.so`? You might be able to build using `devtoolset-7-gcc-c++` (installable from the CentOS Software Collections). That provides a much newer GCC that produces binaries that don't have any dynamic dependency on the newer libstdc++, so will run on any CentOS 7 system. – Jonathan Wakely Oct 18 '18 at 17:03

0 Answers0