diff options
Diffstat (limited to 'libbutl/optional.mxx')
-rw-r--r-- | libbutl/optional.mxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libbutl/optional.mxx b/libbutl/optional.mxx index 0f18c11..470c608 100644 --- a/libbutl/optional.mxx +++ b/libbutl/optional.mxx @@ -43,7 +43,7 @@ LIBBUTL_MODEXPORT namespace butl template <typename T> struct optional_data<T, false> { - struct empty {char x;}; // Note: byte size is important to GCC. + struct empty {char x[sizeof(T)];}; // Note: data member important to GCC. union { @@ -86,7 +86,7 @@ LIBBUTL_MODEXPORT namespace butl template <typename T> struct optional_data<T, true> { - struct empty {char x;}; // Note: byte size is important to GCC. + struct empty {char x[sizeof(T)];}; // Note: data member important to GCC. union { |