Fix some -Wmaybe-uninitialized warnings

This commit is contained in:
Andrzej Krzemienski
2023-12-29 01:40:01 +01:00
parent c60db27762
commit e31cf6f2a8
7 changed files with 221 additions and 58 deletions

View File

@@ -60,9 +60,9 @@ class aligned_storage
T * ptr_ref() { return static_cast<T *> (address()); }
#endif
T const& ref() const { return *ptr_ref(); }
T & ref() { return *ptr_ref(); }
T const& ref() const { return *boost::core::launder(ptr_ref()); }
T & ref() { return *boost::core::launder(ptr_ref()); }
} ;
} // namespace optional_detail