[libcxx-dev] Providing custom template specialization for std::optional?

Eric Fiselier via libcxx-dev libcxx-dev at lists.llvm.org
Wed Mar 6 21:39:28 PST 2019


On Wed, Mar 6, 2019 at 5:41 PM Владимир Гончаров via libcxx-dev <
libcxx-dev at lists.llvm.org> wrote:

> Hello!
>
> I'm implementing a specialization for std::optional for my program-defined
> type.
>

Can you explain what your specialization does differently? And why it's
needed?


> As I understand *[namespace.std]*, nothing forbids me from doing that.
>

I agree that you've interpreted the standard correctly. But I think the
standard is being too permissive here.
Implementing a complex component may necessitate knowledge of the
internals. `<variant>` is a good example.

I would like to know what other library maintainers think.

/Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/libcxx-dev/attachments/20190307/4da20574/attachment.html>


More information about the libcxx-dev mailing list