summaryrefslogtreecommitdiff
path: root/include/fud_option.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/fud_option.hpp')
-rw-r--r--include/fud_option.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/fud_option.hpp b/include/fud_option.hpp
index 3b0eb1b..af2fcd3 100644
--- a/include/fud_option.hpp
+++ b/include/fud_option.hpp
@@ -229,7 +229,8 @@ class Option {
m_data.clear();
}
- alignas(alignof(T)) option_detail::DataArray<Size> m_data{};
+ static constexpr auto Align = std::max(alignof(T), alignof(std::reference_wrapper<T>));
+ alignas(Align) option_detail::DataArray<Size> m_data{};
bool m_engaged;
};