Boost logo

Boost :

Subject: Re: [boost] [msvc] #warning preprocessor directive
From: Beman Dawes (bdawes_at_[hidden])
Date: 2017-10-17 16:04:03


On Tue, Oct 17, 2017 at 11:30 AM, Robert Ramey via Boost <
boost_at_[hidden]> wrote:
...

> What I have always wanted is the equivalent of static_warning(condition,
> message). Of course this would be like static_assert except that it
> wouldn't be an error. The need for this comes up when I can detect at
> compile time that something is likely not what the user intended, but is
> not necessarily wrong. One example of this would be an attempt to
> serialize some data type via a non const reference. This would work, but
> it leaves open that possibility that the users serialize functions alter
> the data being serialized, which would break the presumptions made by the
> serialization library.
>

That thought occurred to me after I posted the original message, so you are
way ahead of me:-)

--Beman


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