C++ Logo

std-proposals

Advanced search

std::any for non-copyable types

From: Antony Polukhin <antoshkka_at_[hidden]>
Date: Thu, 28 May 2020 16:41:58 +0300
Hi,

Is there a proposal for std::any like type that does not require held types
to be copyable and has unique ownership of the held data?

Is there interest in such class?

We have an in house implementation that I find very useful for storing
structures that contain unique_ptr (Flatbuffers, recursive types) and even
non-movable types with mutexes.

Received on 2020-05-28 08:45:15