[cfe-dev] Improving diagnostics when moving standard library headers

Marshall Clow via cfe-dev cfe-dev at lists.llvm.org
Fri Aug 17 09:40:15 PDT 2018


On Fri, Aug 17, 2018 at 8:40 AM, Louis Dionne via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

>
> On Aug 10, 2018, at 13:30, JF Bastien <jfbastien at apple.com> wrote:
>
>
> On Aug 10, 2018, at 8:39 AM, Keane, Erich via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
>
> Would a better solution be to simply have <experimental/optional> #include
> <optional> (perhaps with some namespace-wrapping?), and in C++17+ mode have
> a #warning instead of that #error?
>
>
> Seems like a better fix, yes.
>
>
> Just to follow up on this. It’s been said before, but the problem is that
> std::experimental::optional and std::optional are not the same thing.
> std::experimental::optional is frozen in time, but std::optional will keep
> evolving. Hence, we would really need to keep providing two implementations
> that may start diverging with time. This is explained here:
> http://libcxx.llvm.org/TS_deprecation.html.
>
>
A nit: "May start diverging with time" is too optimistic.
"Have diverged, and will continue to diverge in the future" is the correct
state.

-- Marshall
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180817/bb781d62/attachment.html>


More information about the cfe-dev mailing list