C++ Logo


Advanced search

Re: [std-proposals] Halfway between 'variant' and 'any'

From: Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>
Date: Tue, 3 Jan 2023 07:38:14 +0000
On Monday, January 2, 2023, Edward Catmur <ecatmur_at_[hidden]> wrote:

> You could accomplish the inplace part with an appropriate allocator.

If the allocator fails to allocate because the buffer is too small, then
this problem can be detected at runtime and we can throw an exception. But
with the classes I wrote, we can catch this at compile time either with
'static_assert' or a concept constraint.

Received on 2023-01-03 07:38:15