Boost logo

Boost :

From: Rozental, Gennadiy (gennadiy.rozental_at_[hidden])
Date: 2004-09-20 15:06:08


> > I added #include <ios>, which is apparently missing.
> >
> > Is there flag that separate standard/classic iostream (If I guess
> > correctly - it should be enough)
>
> #ifndef BOOST_NO_STD_LOCALE
> #include <ios>
> #endif
>
> John.
> (I also need to make the same fix!).

It's quite obscure variable name for something very simple : switch
classic/standard io.

If you search through boost source you will see:

1. Check like "#if defined(__GNUC__) && (__GNUC__ < 3)" in
boost/shared_ptr.hpp, boost/intrusive_ptr.hpp, boost/math/octonion.hpp
boost/math/quaternion.hpp

(which is incorrect BTW IMO since gcc2.95 could be using STLPort)

2. #ifndef BOOST_NO_TEMPLATE_STD_STREAM in boost/format/free_funcs.hpp and
others
   Look also in boost/format/detail/workarounds_gcc-2.95.hpp that contains
detailed workaround for gcc2.95 without STLPort

3. #if __GNUC__ < 3 in graph/detail/edge.hpp (the same comment applies as in
1.)

4. #ifdef BOOST_NO_TEMPLATED_STREAMS in boost/lambda/detail/operators.hpp
and others, and Boost.Tuple headers

5. #ifdef BOOST_UBLAS_USE_BASIC_STREAM and #ifdef BOOST_UBLAS_USE_STREAM in
ublas code

6. #ifndef BOOST_NO_STD_LOCALE in boost.random/detail/... several headers,
Boost.Regex,

7. #if BOOST_WORKAROUND(__GNUC__, < 3) && !defined(__SGI_STL_PORT) &&
!defined(_STLPORT_VERSION)
In Boost.Test headers

8. Boost.Variant present workarounds based on #if
!defined(BOOST_NO_STD_LOCALE) in boost/detail/templated_streams.hpp

9. #ifdef BOOST_OLD_IOSTREAMS in boost/dynamic_bitset/dynamic_bitset.hpp

10. # if !defined(BOOST_IOFM_NO_BASIC_STREAM) in output formatters library
currently under review.

Also you could see that std::basic_ostream is used outside #ifndef
BOOST_NO_STD_LOCALE and many other places where standard iostreams are used
without any checks.

I believe we need to put stop to this mess and force everybody use the same
practice/variable(s).

My vote is for BOOST_CLASSIC_IOSTREAMS, BOOST_STANDARD_IOSTREAMS.

Regards,

Gennadiy.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk