Opened 7 years ago

Closed 7 years ago

#11402 closed Bugs (fixed)

Failed to compile with c++11

Reported by: andyplekhanov@… Owned by: John Maddock
Milestone: To Be Determined Component: multiprecision
Version: Boost 1.58.0 Severity: Problem
Keywords: Cc:

Description

If I add -std=c++0x to g++ (version 4.6.2 (SUSE Linux))

g++ -O2 -I/home/apl/boost_devel/boost_1_58_0 -std=c++0x -lgmp -o test test.cpp

and compile attached file, compiler failed while without c++0x flag it compiled successfully.

Attachments (1)

test.cpp (4.2 KB ) - added by andyplekhanov@… 7 years ago.

Download all attachments as: .zip

Change History (7)

by andyplekhanov@…, 7 years ago

Attachment: test.cpp added

comment:1 by John Maddock, 7 years ago

It works for me with Boost-1.55, 1.56, and 1.57 and GCC-4.9.2, I'll try an older GCC version later.

comment:2 by anonymous, 7 years ago

This bug is in boost 1.58

comment:3 by John Maddock, 7 years ago

Your test compiles with 1.58 and GCC-4.9.2 as well. So it's looking like a compiler bug, or possibly a mis-configuration somewhere, but I'll know more when gcc-4.6 has finished building!

comment:4 by John Maddock, 7 years ago

OK, I can reproduce with gcc-4.6.4, but the error makes no sense to me at present. If it's possible to fix this for the next release I will, but the quickest fix would be for you to use a rather less obsolete gcc version if you can.

comment:5 by anonymous, 7 years ago

Update: compiles OK with gcc-4.7.4 in C++11 mode. Or with 4.6.4 if you define BOOST_NO_CXX11_NOEXCEPT.

Note: See TracTickets for help on using tickets.