[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
C++ error
From: |
Laurent Gatto |
Subject: |
C++ error |
Date: |
Tue, 12 Nov 2024 08:41:00 +0100 |
Dear all,
I have this very simple code chunk
$ cat main.cpp
#include <iostream>
int main(void) {
std::cout << __cplusplus;
return 0;
}
That I can compile in a minimal shell
$ guix shell --container gcc-toolchain
[env]$ g++ main.cpp && ./a.out
201703
However, on my main system, I get
$ g++ main.cpp
In file included from /home/lgatto/.guix-profile/include/c++/bits/move.h:57,
from
/home/lgatto/.guix-profile/include/c++/bits/exception_ptr.h:43,
from /home/lgatto/.guix-profile/include/c++/exception:153,
from /home/lgatto/.guix-profile/include/c++/ios:39,
from /home/lgatto/.guix-profile/include/c++/ostream:38,
from /home/lgatto/.guix-profile/include/c++/iostream:39,
from main.cpp:1:
/home/lgatto/.guix-profile/include/c++/type_traits:732:26: error:
expected identifier before ‘(’ token
732 | _GLIBCXX20_DEPRECATED("use is_standard_layout &&
is_trivial instead")
| ^
/home/lgatto/.guix-profile/include/c++/type_traits:732:27: error:
expected unqualified-id before string constant
732 | _GLIBCXX20_DEPRECATED("use is_standard_layout &&
is_trivial instead")
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/lgatto/.guix-profile/include/c++/type_traits:732:27: error:
expected ‘)’ before string constant
732 | _GLIBCXX20_DEPRECATED("use is_standard_layout &&
is_trivial instead")
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| )
/home/lgatto/.guix-profile/include/c++/type_traits:3154:25: error:
expected unqualified-id before string constant
3154 | _GLIBCXX20_DEPRECATED("use is_standard_layout_v &&
is_trivial_v instead")
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/lgatto/.guix-profile/include/c++/type_traits:3154:25: error:
expected ‘)’ before string constant
3154 | _GLIBCXX20_DEPRECATED("use is_standard_layout_v &&
is_trivial_v instead")
|
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| )
Other issues lead me to suspect that I lost support for C++17 and beyond.
Any idea what/how I messed up and how to fix this?
Thanks in advance.
Laurent
- C++ error,
Laurent Gatto <=
- Re: C++ error, Fredrik Salomonsson, 2024/11/12
- Re: C++ error, Laurent Gatto, 2024/11/12
- Re: C++ error, Fredrik Salomonsson, 2024/11/12
- Re: C++ error, Laurent Gatto, 2024/11/13
- Re: C++ error, Fredrik Salomonsson, 2024/11/13
- Re: C++ error, Laurent Gatto, 2024/11/13
- Re: C++ error, Fredrik Salomonsson, 2024/11/14
- Re: C++ error, Laurent Gatto, 2024/11/16
- Re: C++ error, Laurent Gatto, 2024/11/16
- Re: C++ error, Fredrik Salomonsson, 2024/11/18