Opened 3 years ago

Last modified 8 months ago

#10698 new Bugs

noexcept(true) for ~noncopyable?

Reported by: olafvdspek@… Owned by: Peter Dimov
Milestone: To Be Determined Component: core
Version: Boost 1.57.0 Severity: Problem
Keywords: Cc: Andrey Semashev


Shouldn't ~noncopyable be noexcept?

I'm seeing this error:

class Cconnection : public Cclient, boost::noncopyable

connection.h:5:7: error: looser throw specifier for ‘virtual Cconnection::~Cconnection()’
In file included from connection.h:3:0,
                 from connection.cpp:2:
client.h:10:10: error:   overriding ‘virtual Cclient::~Cclient() noexcept (true)’

Attachments (0)

Change History (3)

comment:1 Changed 8 months ago by Andrey Semashev

Destructors are noexcept implicitly. What you're seeing is a compiler bug (is it gcc 4.7?)

comment:2 Changed 8 months ago by Andrey Semashev

Component: utilitycore
Owner: changed from No-Maintainer to Peter Dimov

comment:3 Changed 8 months ago by Andrey Semashev

Cc: Andrey Semashev added

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain Peter Dimov.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.