#3051 closed Patches (fixed)
boost::variant should observe BOOST_NO_TYPEID and BOOST_NO_IOSTREAM
Reported by: | 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)
Change History (7)
by , 13 years ago
Attachment: | variant.hpp added |
---|
comment:1 by , 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 , 13 years ago
Severity: | Showstopper → Problem |
---|
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 , 13 years ago
Attachment: | variant.patch added |
---|
Patch for both variant and blank, with tests and a little documentation.
comment:3 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 by , 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.
........
Modified variant.hpp