This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 479409 - multi_pass.hpp includes iostream.h but doesn't need it
multi_pass.hpp includes iostream.h but doesn't need it
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: boost (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Benjamin Kosnik
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-09 07:47 EST by Caolan McNamara
Modified: 2013-08-09 01:48 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-12 06:26:16 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch to remove unused iostreams include (585 bytes, patch)
2009-01-09 07:47 EST, Caolan McNamara
no flags Details | Diff

  None (edit)
Description Caolan McNamara 2009-01-09 07:47:02 EST
Created attachment 328539 [details]
patch to remove unused iostreams include

Description of problem:
boost_1_37_0/boost/spirit/home/classic/iterator/multi_pass.hpp includes iostream.h but doesn't seem to require it

Version-Release number of selected component (if applicable):
boost-1.37.0-2.fc11

The problem is that anything that includes that header will then end up including iostream.h which has a global object in it to force the iostream/stdio locking methods in the .o file, i.e. 

std::ios_base::Init::Init()
and
std::ios_base::Init::~Init()

and calling them in the global .so ctors and dtors which is unnecessary if iostreams aren't actually used is a titchy startup-time de-optimization

to reproduce

before:
> echo "#include <boost/spirit/home/classic/iterator/multi_pass.hpp>" | g++ -c -x c++ - -o test.o
> nm test.o 
000000000000003d t _GLOBAL__I_
0000000000000000 t _Z41__static_initialization_and_destruction_0ii
                 U _ZNSt8ios_base4InitC1Ev
                 U _ZNSt8ios_base4InitD1Ev
0000000000000000 b _ZStL8__ioinit
                 U __cxa_atexit
                 U __dso_handle
                 U __gxx_personality_v0

after:
> echo "#include <boost/spirit/home/classic/iterator/multi_pass.hpp>" | g++ -c -x c++ - -o test.o
> nm test.o 
<nothing>
Comment 1 Petr Machata 2009-01-12 06:26:16 EST
Built in rawhide.  Thanks for the patch!

Note You need to log in before you can comment on or make changes to this bug.