Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#3051 closed Patches (fixed)

boost::variant should observe BOOST_NO_TYPEID and BOOST_NO_IOSTREAM

Reported by: nstewart@… Owned by: ebf
Milestone: Boost 1.40.0 Component: variant
Version: Boost 1.38.0 Severity: Problem
Keywords: boost::variant, variant, BOOST_NO_TYPEID, BOOST_NO_IOSTREAM Cc:

Description

boost:variant can be used with both BOOST_NO_TYPEID and BOOST_NO_IOSTREAM, providing it is conditionalized to omit certain functionality:

17a18,19

#if !defined(BOOST_NO_TYPEID)

18a21

#endif BOOST_NO_TYPEID

693a697,699

#if !defined(BOOST_NO_TYPEID)

706a713,714

#endif BOOST_NO_TYPEID

1629a1638

#if !defined(BOOST_NO_TYPEID)

1634a1644

#endif

1825a1836,1837

#if !defined(BOOST_NO_IOSTREAM)

1826a1839

#endif BOOST_NO_IOSTREAM

This patch is w.r.t 1.38.0, but the version in 1.39.0 appears to be unchanged.

Attachments (3)

variant.hpp (49.8 KB ) - added by anonymous 13 years ago.
Modified variant.hpp
variant.diff (345 bytes ) - added by anonymous 13 years ago.
variant.hpp diff w.r.t boost 1.38.0
variant.patch (5.0 KB ) - added by Daniel James 13 years ago.
Patch for both variant and blank, with tests and a little documentation.

Download all attachments as: .zip

Change History (7)

by anonymous, 13 years ago

Attachment: variant.hpp added

Modified variant.hpp

by anonymous, 13 years ago

Attachment: variant.diff added

variant.hpp diff w.r.t boost 1.38.0

comment:1 by Marshall Clow, 13 years ago

This patch applies ok (though it should really be a full SVN diff), and rebuilding doesn't seem to cause any problems; at least the variant tests all pass. Tested on Mac OS X, gcc 4.0.1

comment:2 by Daniel James, 13 years ago

Severity: ShowstopperProblem

I'm attaching a new patch. It includes the changes to blank.hpp (as it seems to be part of variant - that it isn't documented or tested is another bug, all top level headers should have a link to their library's documentation). It also adds a couple of notes to reference documentation and fixes the tests for when BOOST_NO_TYPEID isn't defined. I tested it with the following in my user-config.jam:

using darwin : 4.4nortti : ccache g++-mp-4.4 -fno-rtti ;

BOOST_NO_IOSTREAM is harder to test as the tests rely heavily on it, but I tried a simple file which included STLport with _STLP_USE_NO_IOSTREAMS defined and it seemed okay.

by Daniel James, 13 years ago

Attachment: variant.patch added

Patch for both variant and blank, with tests and a little documentation.

comment:3 by Daniel James, 13 years ago

Resolution: fixed
Status: newclosed

(In [53682]) Support BOOST_NO_TYPEID and BOOST_NO_IOSTREAM in Boost.Variant. Fixes #3051.

comment:4 by Daniel James, 13 years ago

(In [54398]) Support BOOST_NO_TYPEID and BOOST_NO_IOSTREAM in Boost.Variant. Fixes #3051.

Merged revisions 53682 via svnmerge from https://svn.boost.org/svn/boost/trunk

........

r53682 | danieljames | 2009-06-06 12:46:24 +0100 (Sat, 06 Jun 2009) | 1 line

Support BOOST_NO_TYPEID and BOOST_NO_IOSTREAM in Boost.Variant. Fixes #3051.

........

Note: See TracTickets for help on using tickets.