From: Baptiste Demoulin <baptiste.demoulin@univ-amu.fr>
To: help-guix@gnu.org
Subject: Problem with g++ and iostream
Date: Fri, 01 Mar 2024 10:50:38 +0100 [thread overview]
Message-ID: <87plweb7b0.fsf@univ-amu.fr> (raw)
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
next reply other threads:[~2024-03-01 10:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-01 9:50 Baptiste Demoulin [this message]
2024-03-01 10:10 ` Problem with g++ and iostream 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87plweb7b0.fsf@univ-amu.fr \
--to=baptiste.demoulin@univ-amu.fr \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).