|
Boost : |
From: Klemens Morgenstern (klemensdavidmorgenstern_at_[hidden])
Date: 2024-11-16 11:33:21
> >
> > That's correct, that's also what it was originally. But the error
> > messages were horrendous.
> > By creating a base class you get good error messages (purely virtual
> > because method X is missing) and the compiler is still compelled to
> > devirtualize by the way it's used.
> > And because it's effectively unused, you can disable it.
>
> Couldn't you achieve a similar effect (scoped to C++20 and later) by
> conditionally using concepts? In a way similar to what Asio does to
> diagnose completion tokens (i.e. BOOST_ASIO_COMPLETION_TOKEN_FOR).
Yes, but I wanted to provide a solution for C++14.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk