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

Subject: Re: [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-27 09:37:35


#12554: boost/core/typeinfo.hpp creates unwanted strings in release binary
------------------------------------+---------------------
  Reporter: Lev Sch <Zorechfan@…> | Owner: pdimov
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: core
   Version: Boost 1.62.0 | Severity: Problem
Resolution: | Keywords:
------------------------------------+---------------------

Comment (by Lev Sch <Zorechfan@…>):

 At this morning, I have created minimal steps to reproduce.

 1. Create "Win32 Console Application" in Microsoft Visual Studio with
 default settings
 2. select "Release" configuration to build
 3. add preprocessor include path to boost
 4. add preprocessor definition BOOST_NO_TYPEID
 5. disable RTTI by compiler flag
 6. replace content of file that contains "main" function by:
 {{{
 #!div style="font-size: 80%"
 Code highlighting:
   {{{#!C++

 // ConsoleApplication2.cpp : Defines the entry point for the console
 application.
 //

 #include "stdafx.h"

 #include <boost/shared_ptr.hpp>
 #include <boost/make_shared.hpp>

 int main()
 {
   class MyFavoriteClass {
   public:
     void print()
     {
       printf("HelloWorldABC\n");
     }
   };
   //boost::shared_ptr<MyFavoriteClass> ptr(new MyFavoriteClass());
   boost::shared_ptr<MyFavoriteClass> ptr =
 boost::make_shared<MyFavoriteClass>();
   ptr->print();

   return 0;
 }
   }}}
 }}}
 7. build application
 8. (!) ConsoleApplication2.exe will contain "!MyFavoriteClass"
 9. In file boost\core\typeinfo.hpp replace BOOST_CURRENT_FUNCTION by ""
 (empty string)
 10. build application
 11. (!) ConsoleApplication2.exe will NOT contain "!MyFavoriteClass"

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12554#comment:2>
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