diff --git a/include/fplus/maybe.hpp b/include/fplus/maybe.hpp index 54758f15..fbe59eac 100644 --- a/include/fplus/maybe.hpp +++ b/include/fplus/maybe.hpp @@ -240,7 +240,14 @@ class maybe { } } bool is_present_; - typename std::aligned_storage::type value_; +#ifdef _MSC_VER + __pragma(warning(push)) + __pragma(warning(disable : 4324)) +#endif + alignas(T) unsigned char value_[sizeof(T)]; +#ifdef _MSC_VER + __pragma(warning(pop)) +#endif }; // API search type: is_just : Maybe a -> Bool diff --git a/include_all_in_one/include/fplus/fplus.hpp b/include_all_in_one/include/fplus/fplus.hpp index 799b670d..80894cdd 100644 --- a/include_all_in_one/include/fplus/fplus.hpp +++ b/include_all_in_one/include/fplus/fplus.hpp @@ -2797,7 +2797,14 @@ class maybe { } } bool is_present_; - typename std::aligned_storage::type value_; +#ifdef _MSC_VER + __pragma(warning(push)) + __pragma(warning(disable : 4324)) +#endif + alignas(T) unsigned char value_[sizeof(T)]; +#ifdef _MSC_VER + __pragma(warning(pop)) +#endif }; // API search type: is_just : Maybe a -> Bool