1 |
On 9/17/18 at 5:24 PM user Matt Turner <mattst88@g.o> wrote: |
2 |
> I don't understand what a potential solution would be. |
3 |
> |
4 |
> The various projects use -std=c++XXX because that's what their code |
5 |
> requires. -std=c++XXX can't generally be changed. If a dependent |
6 |
> project is incompatible that's no different than any other case of |
7 |
> incompatible dependencies in Gentoo. |
8 |
|
9 |
It can't generally be downgraded. I'd expect very few post-C++11 |
10 |
packages to actually break when upgrading just the standard. |
11 |
|
12 |
|
13 |
> I think -std=c++XXX discussions before happened because gcc changed |
14 |
> the C++ ABI with -std=c++11. I don't think that's particularly |
15 |
> relevant here, since as far as I know different -std=c++XXX values |
16 |
> don't change the ABI with current gcc. |
17 |
|
18 |
noexcept specifier on functions became a part of the function type in |
19 |
C++17, so it can affect name mangling there. |
20 |
|
21 |
Given this code: |
22 |
|
23 |
|
24 |
void no () noexcept (false); |
25 |
void yes () noexcept (true); |
26 |
|
27 |
void foo1 (decltype (&no)) {} |
28 |
|
29 |
void foo2 (decltype (&yes)) {} |
30 |
|
31 |
|
32 |
the compiler will [1] mangle foo1 and foo2 differently depending on |
33 |
whether it's built using C++ <= 14 or C++ >= 17. |
34 |
|
35 |
|
36 |
[1] https://gcc.godbolt.org/z/xmZTBO |
37 |
|
38 |
-- |
39 |
Georg Rudoy |