Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#1765 closed Bugs (fixed)

Need a macro to determine whether basic streams are present

Reported by: Andrew Eames <andrew@…> Owned by: John Maddock
Milestone: Boost 1.36.0 Component: config
Version: Boost 1.35.0 Severity: Problem
Keywords: macro ostream basic_ostream Cc: Peter Dimov

Description

shared_ptr.hpp line 560 (boost 1.35)reads #if defined(GNUC) && (GNUC < 3)

template<class Y> std::ostream & operator<< (std::ostream & os, shared_ptr<Y> const & p) ...

The test should be something more generic - Peter Dimov suggested BOOST_NO_BASIC_STREAM as a new boost macro - then this code can compile for other (unsupported) compilers

Change History (5)

comment:1 Changed 10 years ago by Peter Dimov

Cc: Peter Dimov added

comment:2 Changed 10 years ago by John Maddock

Status: newassigned

I've tended to (ab)use BOOST_NO_STD_LOCALE for this in the past, but if we want a more specific macro, then what about BOOST_NO_NEW_IOSTREAMS ?

John.

comment:3 Changed 10 years ago by Peter Dimov

Any name is fine with me, although BOOST_NO_BASIC_STREAM leaves less room for misunderstandings. BOOST_NO_TEMPLATED_(IO)STREAMS is another option.

comment:4 Changed 10 years ago by John Maddock

Resolution: fixed
Status: assignedclosed

I've added support for BOOST_NO_TEMPLATED_IOSTREAMS to Boost.Config as of revision #44689. Currently the macro is not defined for any compiler, but the tests and docs are all present.

HTH, John.

comment:5 Changed 10 years ago by Peter Dimov

shared_ptr.hpp changed to test the new macro: [44707]. I've left the old condition (__GNUC__ < 3) intact; if/when this is added to gcc.hpp I'll remove it.

Note: See TracTickets for help on using tickets.