Opened 4 years ago

Last modified 16 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)’

Change History (3)

comment:1 Changed 16 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 16 months ago by Andrey Semashev

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

comment:3 Changed 16 months ago by Andrey Semashev

Cc: Andrey Semashev added
Note: See TracTickets for help on using tickets.