all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* C++ error
@ 2024-11-12  7:41 Laurent Gatto
  2024-11-12 17:54 ` Fredrik Salomonsson
  0 siblings, 1 reply; 12+ messages in thread
From: Laurent Gatto @ 2024-11-12  7:41 UTC (permalink / raw)
  To: help-guix

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


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-11-21  8:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-12  7:41 C++ error Laurent Gatto
2024-11-12 17:54 ` Fredrik Salomonsson
2024-11-12 20:26   ` Laurent Gatto
2024-11-13  0:50     ` Fredrik Salomonsson
2024-11-13  6:49       ` Laurent Gatto
2024-11-13 19:12         ` Fredrik Salomonsson
2024-11-13 21:33           ` Laurent Gatto
2024-11-14 18:51             ` Fredrik Salomonsson
2024-11-16 10:56               ` Laurent Gatto
2024-11-16 13:19                 ` Laurent Gatto
2024-11-18 18:49                   ` Fredrik Salomonsson
2024-11-21  8:50                     ` Laurent Gatto

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.