optional-lite
optional-lite copied to clipboard
Propagating copy-constructor triviality
I noticed I wasn't able to instantiate std::atomic<nonstd::optional<int>>
in Visual Studio 2019 because std::is_trivially_copyable
wasn't true for nonstd::optional<int>
There's a defect report for this: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0602r1.html (Not sure if it was actually accepted into the standard? But at least Microsoft implemented it in their STL implementation https://learn.microsoft.com/en-us/cpp/overview/what-s-new-for-cpp-2017?view=msvc-170 )
Thanks for the heads-up.
Had a brief look at it. It may not be a 'trivial' change, requiring a bit of probing how I'd like to approach this.
May take some time.