Boost logo

Boost :

From: Ivan Matek (libbooze_at_[hidden])
Date: 2021-08-07 23:11:15


Don't want to offtopic too much, but does anybody else feels that we could
use
runtime_assert in boost? Name might be dumb(alternatives: runeval_assert,
smart_assert, ...), but idea is to fix the issue of assert messing with
constexpr functions by running assert only at runtime.
Does something like this already exists in Boost?
https://www.godbolt.org/z/nTzh6TfKK
(uses C++23 if consteval, but obviously it can be made to work in C++20).

Unfortunately error text is useless for most developers since it dies in
runtime_assert, but probably better than nothing.
Also maybe somebody knows a portable Boost way to get the nicer error
message to users, maybe using std::source_location?

On Sat, Aug 7, 2021 at 9:14 AM John Maddock via Boost <boost_at_[hidden]>
wrote:

>
> Yes, just give me a few days I'm tied up right now, John.
>


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