[Boost-bugs] [Boost C++ Libraries] #13122: Four statics from containers_fwd.hpp should be constexpr

Subject: [Boost-bugs] [Boost C++ Libraries] #13122: Four statics from containers_fwd.hpp should be constexpr
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-07-14 13:34:24


#13122: Four statics from containers_fwd.hpp should be constexpr
-------------------------------+---------------------------
 Reporter: robert.mcmillan@… | Owner: Ion Gaztañaga
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: container
  Version: Boost 1.63.0 | Severity: Problem
 Keywords: |
-------------------------------+---------------------------
 We did a study of duplicated global symbols in our modules and found four
 duplicated symbols coming from boost. Every compilation unit that includes
 this header will get four of these statics and they will be duplicated in
 the final executable. We had 525x4 instances of these duplicated globals
 in just one module.

 The tool used to find this problem is described here with source code:

 https://randomascii.wordpress.com/2017/01/08/add-a-const-here-delete-a
 -const-there

 static const ordered_range_t ordered_range = ordered_range_t();
 static const ordered_unique_range_t ordered_unique_range =
 ordered_unique_range_t();
 static const default_init_t default_init = default_init_t();
 static const value_init_t value_init = value_init_t();

 It seems all is needed is for the BOOST_CONSTEXPR_OR_CONST to be used
 instead of 'const'.

-- 
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13122>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-07-14 13:37:35 UTC