Work around a bug in GCC 5-10

This commit is contained in:
Gennaro Prota
2025-12-17 12:21:18 +01:00
parent 7e720a959b
commit ade9f2e509
2 changed files with 11 additions and 0 deletions

View File

@@ -279,4 +279,11 @@ using basic_string_view =
#define BOOST_STATIC_STRING_USE_STD_FORMAT
#endif
#if defined(__GNUC__) && (__GNUC__ >= 5) && (__GNUC__ <= 10) && !defined(__clang__)
// Workaround for GCC complaining about nested classes being private.
#define BOOST_STATIC_STRING_GCC_NESTED_CLASS_WORKAROUND public:
#else
#define BOOST_STATIC_STRING_GCC_NESTED_CLASS_WORKAROUND
#endif
#endif

View File

@@ -322,6 +322,8 @@ class static_string_base
using pointer = value_type*;
using const_pointer = const value_type*;
BOOST_STATIC_STRING_GCC_NESTED_CLASS_WORKAROUND
struct size
{
class basic_static_string
@@ -388,6 +390,8 @@ class static_string_base<0, CharT, Traits>
using value_type = typename Traits::char_type;
using pointer = value_type*;
BOOST_STATIC_STRING_GCC_NESTED_CLASS_WORKAROUND
struct size
{
class basic_static_string