Define and use BOOST_CONTAINER_CONSTANT_VAR to support BOOST_INLINE_CONSTEXPR and static const global variables.

This commit is contained in:
Ion Gaztañaga
2024-06-06 14:39:49 +02:00
parent 33d28a12d1
commit a4c4c3b319
8 changed files with 30 additions and 26 deletions
+1 -5
View File
@@ -469,7 +469,7 @@ class basic_string_base
inline void priv_short_size(size_type sz)
{
typedef unsigned char uchar_type;
static const uchar_type mask = uchar_type(uchar_type(-1) >> 1U);
BOOST_STATIC_CONSTEXPR uchar_type mask = uchar_type(uchar_type(-1) >> 1U);
BOOST_ASSERT( sz <= mask );
//Make -Wconversion happy
this->members_.pshort_repr()->h.length = uchar_type(uchar_type(sz) & mask);
@@ -3085,10 +3085,6 @@ wstring;
#else
template <class CharT, class Traits, class Allocator>
const typename basic_string<CharT,Traits,Allocator>::size_type
basic_string<CharT,Traits,Allocator>::npos;
template<class S>
struct is_string
{