Open EmilyMansfield opened 5 years ago
Thanks for the report! Ah, it's because MSVC doesn't set __cplusplus
properly unless you pass /Zc:__cplusplus
, and the deduction guide is behind an ifdef
. Will see if there's a more foolproof way of detecting C++17 mode for MSVC without that switch.
Ah gotcha, that's good to know in general! I'll set that switch for now, thanks :+1:
Hi, first of all thanks for this library!
On MSVC 19.21 with C++17, CTAD fails with
tl::optional
whereas it works withstd::optional
:I think this is just a case of missing
std::optional
's deduction guide, since adding that in fixes it, but strangely Clang and GCC don't seem to need the guide and deduceT
to beint
anyway. I don't know enough about CTAD to know exactly what's going on here, so sorry if this isn't actually a bug intl::optional
and is instead a compiler bug.