Subject: Re: [boost] [c++1] BOOST_NOEXCEPT macros?
From: Domagoj Saric (domagoj.saric_at_[hidden])
Date: 2011-10-11 05:42:49
On 10.10.2011. 17:55, Beman Dawes wrote:
> On Mon, Oct 10, 2011 at 4:52 AM, Domagoj Saric
> <domagoj.saric_at_[hidden]> wrote:
>> Didn't find that thread so I apologize if it was already discussed
> See http://lists.boost.org/Archives/boost/2011/02/177284.php and replies.
>> couldn't you add compiler specific versions [e.g. __declspec( nothrow ),
>> __attribute(( nothrow ))...] for the non predicate/expression version?
> That thread discussed the possibility of the C++03 version using
> throw() for MSVC and __attribute__((nothrow)) for GCC.
> The uses I'm making of it are for cases where there is nothing in the
> current code, and the docs say "Throws: Nothing".
> I guess we could provide yet another form that handled the
> BOOST_NOEXCEPT_OR_EMPTY_THROWS case, but I'm not greatly interested in
> working that one out. If someone else wants to take that on, fine.
> Hopefully a shorter name could be found. Maybe BOOST_NEVER_THROWS.
I found that thread but it didn't actually mention/discuss any problems with the
compiler specific replacements so I thought you meant some other thread...
I must I don't understand why would using the mentioned compiler specifics
require a different macro? AFAICT these are just different keywords that say the
same thing to the compiler and the user (unless someone is actually worried by
the fact that MSVC will not call std::unexpected/terminate in case you violate
the promise you made about the function in question?)
-- "What Huxley teaches is that in the age of advanced technology, spiritual devastation is more likely to come from an enemy with a smiling face than from one whose countenance exudes suspicion and hate." Neil Postman
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk