Boost logo

Boost :

Subject: Re: [boost] [system] Add noexcept to conform with C++11
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2012-12-10 17:32:34


Le 10/12/12 22:33, Christopher Kohlhoff a écrit :
> Hi Vicente,
>
> On Tue, Dec 11, 2012, at 01:27 AM, Vicente Botet wrote:
>> I don't know what the C++ standard says, but at least MSVC 10.0,
>> gcc-4.7.2
>> and gcc-4.8.0 complain when I define a virtual function as noexept when
>> the
>> original declaration was not noexcept.
> This snippet illustrates what I mean:
>
> class base
> {
> public:
> virtual const char* name() const = 0;
> };
>
> class derived : public base
> {
> public:
> virtual const char* name() const noexcept;
> };
>
> // ...
>
> const char* derived::name() const noexcept
> {
> return "";
> }
>
> This compiles without error on gcc 4.7.2 (debian). Can you please
> confirm whether your experimental changes follow this form?
This as well as the modification I checked on Windows-MinGW compiles
well in MacOs for
darwin-4.7.0x,darwin-4.6.2x,darwin-4.7.1x,clang-3.1xl,clang-3.2xl,darwin-latest_11,darwin-4.7.2x.
on C++11 mode.

I will check your example tomorrow on MinGW. Could someone else check
this simple example on MinGW with compiler supporting noexcept in C++11
mode?

Vicente


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk