mirror of
https://github.com/boostorg/static_string.git
synced 2026-01-19 04:42:12 +00:00
Work around a bug in GCC 5-10
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user