A object pointer value is only a constant expression if it points to an object with static storage duration.

This commit is contained in:
Krystian Stasiowski
2019-12-16 19:22:41 -05:00
parent 68bb317c2a
commit 7c8ad32ff9
2 changed files with 21 additions and 8 deletions

View File

@ -76,14 +76,14 @@ public:
CharT*
data_impl() noexcept
{
return +data_;
return data_;
}
BOOST_STATIC_STRING_CPP14_CONSTEXPR
CharT const*
data_impl() const noexcept
{
return +data_;
return data_;
}
BOOST_STATIC_STRING_CPP11_CONSTEXPR
@ -171,14 +171,14 @@ public:
CharT*
data_impl() noexcept
{
return +data_;
return data_;
}
BOOST_STATIC_STRING_CPP14_CONSTEXPR
CharT const*
data_impl() const noexcept
{
return +data_;
return data_;
}
BOOST_STATIC_STRING_CPP11_CONSTEXPR