id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 9102,"Various Boost header files define variables with internal linkage, which results in unnecessary code bloat",abacabadabacaba@…,Beman Dawes,"Some Boost headers define variables with internal linkage. For example, in `boost/system/error_code.hpp`: {{{ static const error_category & posix_category = generic_category(); static const error_category & errno_ecat = generic_category(); static const error_category & native_ecat = system_category(); }}} In `boost/asio/error.hpp`: {{{ static const boost::system::error_category& system_category = boost::asio::error::get_system_category(); static const boost::system::error_category& netdb_category = boost::asio::error::get_netdb_category(); static const boost::system::error_category& addrinfo_category = boost::asio::error::get_addrinfo_category(); static const boost::system::error_category& misc_category = boost::asio::error::get_misc_category(); }}} Because of this, every translation unit that includes these headers results in a separate instance of each of these variables in the resulting executable file. Because these variables have non-constant initializers, not only they are not eliminated during linking, even if not used, but also each instance of such variable results in a call to a initialization function during program startup. I think that merely including a Boost header, without using anything from it, should not result in any extra code remaining in the resulting executable - especially not if each translation unit results in a separate copy of such code.",Bugs,new,To Be Determined,system,Boost 1.54.0,Optimization,,,