[libcxx-dev] Providing custom template specialization for std::optional?
Владимир Гончаров via libcxx-dev
libcxx-dev at lists.llvm.org
Wed Mar 6 06:51:31 PST 2019
I'm implementing a specialization for std::optional for my program-defined type. As I understand [namespace.std], nothing forbids me from doing that.
However, libcxx optional's converting copy constructor uses __get() <https://github.com/llvm-mirror/libcxx/blob/master/include/optional#L332> on on the optional that's being copied. Since my specialization doesn't provide __get(), I cannot use this copy constructor to convert from the specialization.
So, is this is a bug or am I just not supposed to do what I'm trying to do? Is it worth replacing usages of __get() with dereferencing operator?
Kind regards, Vladimir Goncharov
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the libcxx-dev