revert launder fix

A better fix is now in boost::launder.
This commit is contained in:
Andrzej Krzemienski
2024-01-04 08:29:06 +01:00
parent 790d4f729f
commit b270cf019b

View File

@ -60,16 +60,8 @@ class aligned_storage
T * ptr_ref() { return static_cast<T *> (address()); }
#endif
#if BOOST_WORKAROUND(BOOST_MSVC, < 1920)
// workaround for VS2017 (32 bit) compiler crash
// toolset=msvc-14.1 cxxstd=17 variant=release address-model=32
T const& ref() const { return *ptr_ref(); }
T & ref() { return *ptr_ref(); }
#else
T const& ref() const { return *boost::core::launder(ptr_ref()); }
T & ref() { return *boost::core::launder(ptr_ref()); }
#endif
} ;
} // namespace optional_detail