Skip to content

Commit b524439

Browse files
committed
Fix compilation with GCC on Ubuntu 21.10
GCC seems confused on which union field to initialize when initializing StandardValue's union to m_bool { value }.
1 parent 82f9bf1 commit b524439

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fly/types/string/detail/format_parameters.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ template <typename FormatContext>
447447
template <fly::FormattablePointer T>
448448
constexpr BasicFormatParameter<FormatContext>::BasicFormatParameter(T value) noexcept :
449449
m_type(Type::Pointer),
450-
m_value {.m_standard {.m_pointer {value}, .m_format {format_standard_value<FormatContext, T>}}}
450+
m_value {.m_standard {.m_pointer = value, .m_format {format_standard_value<FormatContext, T>}}}
451451
{
452452
}
453453

@@ -499,7 +499,7 @@ template <typename FormatContext>
499499
template <fly::FormattableBoolean T>
500500
constexpr BasicFormatParameter<FormatContext>::BasicFormatParameter(T value) noexcept :
501501
m_type(Type::Bool),
502-
m_value {.m_standard {.m_bool {value}, .m_format {format_standard_value<FormatContext, T>}}}
502+
m_value {.m_standard {.m_bool = value, .m_format {format_standard_value<FormatContext, T>}}}
503503
{
504504
}
505505

0 commit comments

Comments
 (0)