Opened 8 years ago

Last modified 5 years 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

Description

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 by Andrey Semashev, 5 years ago

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

comment:2 by Andrey Semashev, 5 years ago

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

comment:3 by Andrey Semashev, 5 years ago

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