File indexing completed on 2025-01-18 09:53:21
0001
0002
0003
0004
0005
0006 #ifndef BOOST_UNORDERED_DETAIL_OPT_STORAGE_HPP
0007 #define BOOST_UNORDERED_DETAIL_OPT_STORAGE_HPP
0008
0009 #include <boost/config.hpp>
0010
0011 #include <memory>
0012
0013 namespace boost {
0014 namespace unordered {
0015 namespace detail {
0016 template <class T> union opt_storage
0017 {
0018 BOOST_ATTRIBUTE_NO_UNIQUE_ADDRESS T t_;
0019
0020 opt_storage() {}
0021 ~opt_storage() {}
0022
0023 T* address() noexcept { return std::addressof(t_); }
0024 T const* address() const noexcept { return std::addressof(t_); }
0025 };
0026 }
0027 }
0028 }
0029
0030 #endif