boostorg / container

STL-like containers from Boost
http://www.boost.org/libs/container/
Boost Software License 1.0
96 stars 116 forks source link

Global variables #259

Closed gast128 closed 2 weeks ago

gast128 commented 7 months ago

Hello all,

tried to debug our startup code and get a lot of hits in initialization code of Boost.Container due to some global static variables:

Can these be turned into inline constexpr for C++17 and higher; e.g.:

I think BOOST_INLINE_CONSTEXPR expands to 'inline constexpr' when available and otherwise to 'const'. It may miss the 'static const' case though. Perhaps there is a Boost guideline.

Using Boost 1.79 but it seems not changed since then.

igaztanaga commented 2 weeks ago

Thanks for the report. The fix was implemented in commit:

https://github.com/boostorg/container/commit/a4c4c3b3191ece1396e0a863e63634600b58a44a