|
Boost : |
Subject: Re: [boost] The noexcept Specifier & Block
From: Alexander Terekhov (terekhov_at_[hidden])
Date: 2009-04-17 14:41:03
Sebastian Redl wrote:
>
> Alexander Terekhov wrote:
> > To repeat:
> >
> > noexcept void f() {
> > throw 0;
> > }
> >
> > is supposed to be ill-formed versus well-formed
> >
> > noexcept void f() {
> > noexcept { throw 0; }
> > }
> >
> > invoking undefined behaviour.
> >
> > My point is that both forms shall be well-formed with defined behaviour:
> > invocation of unexpected() at throw point.
> >
>
> What's the point of the noexcept block then?
To have noexcept blocks in addition to functions.
void f() {
...
noexcept { std::cout << __func__; }
...
}
regards,
alexander.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk