all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Problem with g++ and iostream
@ 2024-03-01  9:50 Baptiste Demoulin
  2024-03-01 10:10 ` Tomas Volf
  0 siblings, 1 reply; 6+ messages in thread
From: Baptiste Demoulin @ 2024-03-01  9:50 UTC (permalink / raw)
  To: help-guix

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


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

end of thread, other threads:[~2024-03-01 14:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-01  9:50 Problem with g++ and iostream Baptiste Demoulin
2024-03-01 10:10 ` Tomas Volf
2024-03-01 10:18   ` Baptiste Demoulin
2024-03-01 12:36     ` Baptiste Demoulin
2024-03-01 12:40     ` Baptiste Demoulin
2024-03-01 12:43     ` Baptiste Demoulin

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.