<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Mar 7, 2019, at 00:39, Eric Fiselier via libcxx-dev <<a href="mailto:libcxx-dev@lists.llvm.org" class="">libcxx-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><br class=""></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 6, 2019 at 5:41 PM Владимир Гончаров via libcxx-dev <<a href="mailto:libcxx-dev@lists.llvm.org" class="">libcxx-dev@lists.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;" class=""><div style="overflow-wrap: break-word;" dir="auto" class="">Hello!<div class=""><br class=""></div><div class="">I'm implementing a specialization for std::optional for my program-defined type. </div></div></div></blockquote><div class=""><br class=""></div><div class="">Can you explain what your specialization does differently? And why it's needed?</div><div class=""> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;" class=""><div style="overflow-wrap: break-word;" dir="auto" class=""><div class="">As I understand <font color="#0069d9" class=""><u class="">[namespace.std]</u></font>, nothing forbids me from doing that.</div></div></div></blockquote><div class=""><br class=""></div><div class="">I agree that you've interpreted the standard correctly. But I think the standard is being too permissive here.</div><div class="">Implementing a complex component may necessitate knowledge of the internals. `<variant>` is a good example.</div><div class=""></div><div class=""><br class=""></div><div class="">I would like to know what other library maintainers think.</div></div></div></div></blockquote><div><br class=""></div><div>I think it is a bug in the Standard that we don't explicitly state which templates are safe to specialize, and prohibit doing so by default. I would not try to do anything special to support this in libc++ and I would instead fix the Standard.</div><div><br class=""></div><div>Louis</div><div><br class=""></div></div></body></html>