help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with g++ and iostream


From: Baptiste Demoulin
Subject: Problem with g++ and iostream
Date: Fri, 01 Mar 2024 10:50:38 +0100
User-agent: mu4e 1.10.8; emacs 29.1

Hello,

I encountered a problem today with the =g++= compiler from the package =gcc-toolchain=. When compiling a simple hello world program:

#+begin_src c++
 #include <iostream>
int main () {
   std::cout << "Hello World\n";
   return 0;
 }
#+end_src

with:
#+begin_src bash
 g++ hello.cc
#+end_src

I have the following errors, tracing back to the =iostream.h= file:
#+begin_example
In file included from /home/baptiste/.guix-profile/include/c++/bits/move.h:57, from /home/baptiste/.guix-profile/include/c++/bits/exception_ptr.h:43, from /home/baptiste/.guix-profile/include/c++/exception:153, from /home/baptiste/.guix-profile/include/c++/ios:39, from /home/baptiste/.guix-profile/include/c++/ostream:38, from /home/baptiste/.guix-profile/include/c++/iostream:39,
                from iostream.cc:1:
/home/baptiste/.guix-profile/include/c++/type_traits:732:26: error: expected identifier before '(' token 732 | _GLIBCXX20_DEPRECATED("use is_standard_layout && is_trivial instead")
     |                          ^
/home/baptiste/.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/baptiste/.guix-profile/include/c++/type_traits:732:27: error: expected ')' before string constant 732 | _GLIBCXX20_DEPRECATED("use is_standard_layout && is_trivial instead") | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     |                           )
/home/baptiste/.guix-profile/include/c++/type_traits:1497:12: error: expected identifier before '__is_nothrow_convertible'
1497 |     struct __is_nothrow_convertible
     |            ^~~~~~~~~~~~~~~~~~~~~~~~
/home/baptiste/.guix-profile/include/c++/type_traits:1497:12: error: expected unqualified-id before '__is_nothrow_convertible' /home/baptiste/.guix-profile/include/c++/type_traits:3058:66: error: template argument 2 is invalid 3058 | __is_nothrow_convertible<typename _Result::type, _Ret>> | ^~ /home/baptiste/.guix-profile/include/c++/type_traits:3153:25: error: expected unqualified-id before string constant 3153 | _GLIBCXX20_DEPRECATED("use is_standard_layout_v && is_trivial_v instead") | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/baptiste/.guix-profile/include/c++/type_traits:3153:25: error: expected ')' before string constant 3153 | _GLIBCXX20_DEPRECATED("use is_standard_layout_v && is_trivial_v instead") | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     |                         )
#+end_example

Is it a bug, or am I doing something wrong here ?

Thanks a lot for your help !

bests,

baptiste



--
Baptiste Demoulin <baptiste.demoulin@univ-amu.fr>
Research Engineer (Ingénieur de Recherche, CNRS)
Centre Interdisciplinaire de Nanoscience de Marseille (CINaM)
Département Théorie et Simulation Numérique
Campus de Luminy – Case 913
13288 MARSEILLE Cedex 09



reply via email to

[Prev in Thread] Current Thread [Next in Thread]