On 9/17/18 at 5:24 PM user Matt Turner <[email protected]> wrote:
> I don't understand what a potential solution would be.
>
> The various projects use -std=c++XXX because that's what their code
> requires. -std=c++XXX can't generally be changed. If a dependent
> project is incompatible that's no different than any other case of
> incompatible dependencies in Gentoo.
It can't generally be downgraded. I'd expect very few post-C++11
packages to actually break when upgrading just the standard.
> I think -std=c++XXX discussions before happened because gcc changed
> the C++ ABI with -std=c++11. I don't think that's particularly
> relevant here, since as far as I know different -std=c++XXX values
> don't change the ABI with current gcc.
noexcept specifier on functions became a part of the function type in
C++17, so it can affect name mangling there.
Given this code:
void no () noexcept (false);
void yes () noexcept (true);
void foo1 (decltype (&no)) {}
void foo2 (decltype (&yes)) {}
the compiler will [1] mangle foo1 and foo2 differently depending on
whether it's built using C++ <= 14 or C++ >= 17.
[1] https://gcc.godbolt.org/z/xmZTBO
--
Georg Rudoy