From 281d3e79523c9c54f5faad1b0ec6ff57f0b49748 Mon Sep 17 00:00:00 2001 From: Martchus Date: Tue, 13 Mar 2018 22:06:32 +0100 Subject: [PATCH] Workaround GGC bug 66297 --- settings.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/settings.h b/settings.h index f72398d..001e436 100644 --- a/settings.h +++ b/settings.h @@ -80,10 +80,21 @@ struct TagCreationSettings { /// \brief Specifies the ID3v2 version to be used in case an ID3v2 tag present or will be created. Valid values are 2, 3 and 4. byte id3v2MajorVersion = 3; - constexpr TagCreationSettings &setFlag(TagCreationFlags flag, bool enabled); + // workaround for GGC bug 66297 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66297) +#if __GNUC__ < 7 || (__GNUC__ == 7 && __GNUC_MINOR__ < 2) + inline +#else + constexpr +#endif + TagCreationSettings &setFlag(TagCreationFlags flag, bool enabled); }; -constexpr TagCreationSettings &TagCreationSettings::setFlag(TagCreationFlags flag, bool enabled) +#if __GNUC__ < 7 || (__GNUC__ == 7 && __GNUC_MINOR__ < 2) +inline +#else +constexpr +#endif +TagCreationSettings &TagCreationSettings::setFlag(TagCreationFlags flag, bool enabled) { if (enabled) { flags |= flag;