C++ Logo

STD-PROPOSALS

Advanced search

Subject: Re: [std-proposals] std::any for non-copyable types
From: Kilian Henneberger (kilis-mail_at_[hidden])
Date: 2020-05-29 02:38:50


I am not aware of the current status of reflection, but my hope would be
that hand-written type-erasure classes will be a thing of the past in
C++23/26. I don't have an opinion on whether we need a "unique_any" but
it would be a shame if we add it in C++23 and then in C++26 it could
have just been a typedef: "using unique_any =
type_class<no_member_functions, unique_storing>;"

Am 28.05.2020 um 15:41 schrieb Antony Polukhin via Std-Proposals:
> 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.
>



STD-PROPOSALS list run by std-proposals-owner@lists.isocpp.org

Standard Proposals Archives on Google Groups