Boost logo

Boost :

Subject: Re: [boost] The noexcept Specifier & Block
From: Alexander Terekhov (terekhov_at_[hidden])
Date: 2009-04-17 11:42:01


Sebastian Redl wrote:
[...]
> >> I still think that the compile error for noexcept-marked functions is
> >> something we definitely want.
> >>
> >
> > So that you can turn such compile errors into undefined behaviour using
> > noexcept blocks or just swallow exceptions?
> >
> I can turn most type mismatch compile errors into undefined behavior by
> using reinterpret_cast. What's your point?

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.

regards,
alexander.


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