Opened 4 years ago

#13633 new Bugs

boost/system/error_code.hpp fails to compile on clang-3.6 in gnu++14 mode due to invalid constexpr

Reported by: Rainer Deyke <rainerd@…> Owned by: Beman Dawes
Milestone: Boost 1.68.0 Component: system
Version: Boost Release Branch Severity: Showstopper
Keywords: constexpr Cc:

Description

A minimal test file that includes "boost/system/error_code.hpp" fails to compile on my clang-3.6 in gnu++14 mode with the Boost 1.68.0 beta 1. The exact command line and error message are:

rainer@rainer10:~/work/cpp_test$ schroot -c steamrt_scout_amd64 -- clang-3.6 -std=gnu++14 -c test.cpp -I boost_1_68_0/ In file included from test.cpp:1: boost_1_68_0/boost/system/error_code.hpp:226:41: error: constexpr constructor

never produces a constant expression [-Winvalid-constexpr]

BOOST_SYSTEM_CONSTEXPR explicit std_category( boost::system::err...

boost_1_68_0/boost/system/error_code.hpp:226:41: note: non-constexpr constructor

'error_category' cannot be used in a constant expression

/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/system_error:69:5: note:

declared here

error_category() noexcept;

1 error generated.

This is a regression from Boost 1.67.

Attachments (2)

test.cpp (39 bytes ) - added by Rainer Deyke <rainerd@…> 4 years ago.
Minimal test file that demonstrates the problem
error.txt (730 bytes ) - added by Rainer Deyke <rainerd@…> 4 years ago.
Actual command line and error message, original formatting

Download all attachments as: .zip

Change History (2)

by Rainer Deyke <rainerd@…>, 4 years ago

Attachment: test.cpp added

Minimal test file that demonstrates the problem

by Rainer Deyke <rainerd@…>, 4 years ago

Attachment: error.txt added

Actual command line and error message, original formatting

Note: See TracTickets for help on using tickets.