Boost logo

Boost :

Subject: Re: [boost] [system] Add noexcept to conform with C++11
From: Nathan Ridge (zeratul976_at_[hidden])
Date: 2012-12-11 09:58:29


> > 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?

It compiles with MinGW GCC 4.7.2.

Regards,
Nate
                                               


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