[Boost-bugs] [Boost C++ Libraries] #12554: boost/core/typeinfo.hpp creates unwanted strings in release binary

Subject: [Boost-bugs] [Boost C++ Libraries] #12554: boost/core/typeinfo.hpp creates unwanted strings in release binary
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-10-26 21:11:09


#12554: boost/core/typeinfo.hpp creates unwanted strings in release binary
-----------------------------------+------------------------------
 Reporter: Lev Sch <Zorechfan@…> | Type: Bugs
   Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.62.0
 Severity: Problem | Keywords:
-----------------------------------+------------------------------
 If a program is compiled for a production build then strings are created
 in program binary.
 Location where the strings are created: boost/core/typeinfo.hpp ->
 boost::core::detail::core_typeid_::name -> BOOST_CURRENT_FUNCTION.

 Current behavior has two drawbacks for a production version of a program:
 1. binary program file size become larger
 2. code symbols are present in production version of a program

 Five minutes proposed solution from me is replace function "name" by
 {{{
 #!div style="font-size: 80%"
 Code highlighting:
   {{{#!c++
   static char const * name()
     {
 #ifdef NDEBUG
         return "";
 #else
         return BOOST_CURRENT_FUNCTION;
 #endif
     }
   }}}
 }}}


 Sorry for English...

 Thank you for attention.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12554>
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-02-16 18:50:20 UTC