Boost logo

Boost :

Subject: Re: [boost] [CallableTraits] The formal review begins today
From: Barrett Adair (barrettellisadair_at_[hidden])
Date: 2017-04-05 04:31:56

On Mon, Apr 3, 2017 at 9:13 AM, Peter Dimov via Boost
<boost_at_[hidden]> wrote:
> Barrett Adair wrote:
>> The "behavior is undefined" notes are limited to the features with
>> template template parameters.
> This seems wrong. Is the behavior really undefined here? "It could format
> your hard drive" undefined? It seems to me that the worst that can happen is
> a compile error ("the program is ill-formed").

No, it's not "Undefined Behavior" in the ISO C++ Standard sense. I understood
"undefined behavior" in the context of a non-std library to mean "violation of
contract", but probably this is a misleading use of the term. Indeed, a compile
error is the worst that can happen.

In retrospect, it's likely better to remove these warnings entirely -- they
are really just disclaimers for the case where a user template e.g. fails a
static_assert, and a CallableTraits feature appears to be unable to SFINAE
as promised.


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