<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 29, 2019, at 16:19, Shoaib Meenai 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 class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class="">Hi,<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class="">We have a codebase that’s built with C++14 and was using <experimental/optional> to use std::optional. This no longer works with libc++ 7 onwards, since <experimental/optional> was removed per the TS deprecation policy.<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class="">We can’t use <optional> because that’s limited to C++17 and above. We’re working on upgrading our codebase, but it’ll take time :) I’m wondering if there’s any solution available that’ll work pre-C++17. Our current plan was to overlay our own <experimental/optional> that’s a copy of the one from libc++ 6, but some sort of solution in the library itself would be ideal.<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class="">I recall there being some past discussion about this, but I can’t find it right now. Looking forward to any suggestions here.</span></div></div></div></blockquote><br class=""></div><div>Unfortunately, I don't know of any other solution. In retrospect, we should have added a deprecation warning to experimental::optional one year before removing it so as to give a heads up to people. However, now that it has been removed, there isn't a workaround. I've suggested to other people that they use boost::optional pre-c++17, but that is obviously not an optimal solution.</div><div><br class=""></div><div>Louis</div><div><br class=""></div></body></html>