You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The advantage of this is that if std::is_empty_v<F> then std::is_empty_v<boost::stl_interfaces::adaptor<F>> will also be true, which allows it in turn to be used as a potentially empty data member in another class and not occupy additional address space in the layout.
The text was updated successfully, but these errors were encountered:
If there is a desire to still get EBO when [[no_unique_address]] is not supported, then adaptor<F> can inherit from F when std::is_empty_v<F> and also !std::is_final_v<F>, otherwise EBO isn't possible. But that would require a partial class template specialization, which would be a bit more involved change than the suggestion above.
Maybe for compatibility it can be a conditionally defined preprocessor macro such as
BOOST_STL_INTERFACES_NO_UNIQUE_ADDRESS
?stl_interfaces/include/boost/stl_interfaces/view_adaptor.hpp
Line 312 in 510eb43
So something like:
and then change the line to
The advantage of this is that if
std::is_empty_v<F>
thenstd::is_empty_v<boost::stl_interfaces::adaptor<F>>
will also be true, which allows it in turn to be used as a potentially empty data member in another class and not occupy additional address space in the layout.The text was updated successfully, but these errors were encountered: