Bug 479409 - multi_pass.hpp includes iostream.h but doesn't need it
multi_pass.hpp includes iostream.h but doesn't need it
Product: Fedora
Classification: Fedora
Component: boost (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Benjamin Kosnik
Fedora Extras Quality Assurance
Depends On:
  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:
Last Closed: 2009-01-12 06:26:16 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
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):

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. 


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

> 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

> echo "#include <boost/spirit/home/classic/iterator/multi_pass.hpp>" | g++ -c -x c++ - -o test.o
> nm test.o 
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.