Boost logo

Boost :

Subject: Re: [boost] [function] function wrapping with noexceptionsafetyguarantee
From: Emil Dotchevski (emil_at_[hidden])
Date: 2010-11-02 03:17:20

On Mon, Nov 1, 2010 at 8:58 PM, OvermindDL1 <overminddl1_at_[hidden]> wrote:
>  f(unsafe_no_throw,1); // possible new syntax, calls function, no null check
>  u(unsafe_no_throw,1); // possible new syntax, whatever the platform

This is somewhat redundant since you can already do


I was proposing a similar change, to add a boost::function constructor
that takes std::nothrow_t, which can be used to initialize an empty
function object which asserts and doesn't throw upon calling op().
However I'm not sure there is a use case even for this: it lets you
pick throw or no-throw semantics, but no-throw semantics are only
useful in BOOST_NO_EXCEPTIONS builds, and therefore the global
no-throw behavior supported by boost::throw_exception should be

Emil Dotchevski
Reverge Studios, Inc.

Boost list run by bdawes at, gregod at, cpdaniel at, john at