Boost logo

Boost :

Subject: Re: [boost] Variant2 review
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2019-04-08 23:13:52


>> In my own code, you'll find lots of stanzas like this:
>>
>> ```
>> #ifdef NDEBUG
>> static_assert(sizeof(X) <= cmax(sizeof(A), sizeof(B), sizeof(C), ...));
>>
>> static_assert(noexcept(std::declval<A>() = std::move(std::declval<A>()));
>> #endif
>> ```
>>
>> ... and so on.
>
> Why do you bother with the #ifdef NDEBUG ?

It signifies "this is important for the final release binary" i.e.
please ask one of the tech leadership if you break this.

It has no technical meaning. But it is *very* effective at worrying people.

Niall


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