[Serialization] 1.33 RC1 unexpected header dependency?
I'm finding an apparent dependency between some non-serialization
headers and the use of BOOST_CLASS_EXPORT.
If boost/optional.hpp or boost/format.hpp or boost/bind.hpp are included
before BOOST_CLASS_EXPORT is used then I get the compilation error:
[C++ Error] export.hpp(210): E2102 Cannot use template 'boost::type<T>'
without specifying specialization parameters
[C++ Error] export.hpp(210): E2293 ) expected
If they are included after then everything's ok. This is BCB 5.6.4.
This precludes me having optional/bind/format in a precompiled header
and also means it's a bit tricky ensuring the correct inclusion order
for a large project.
Richard
==========================================
Here's the code to demonstrate it:
#pragma hdrstop
#include
Richard Jennings wrote:
I'm finding an apparent dependency between some non-serialization headers and the use of BOOST_CLASS_EXPORT.
If boost/optional.hpp or boost/format.hpp or boost/bind.hpp are included before BOOST_CLASS_EXPORT is used then I get the compilation error:
I've tracked this down to a borland compiler issue. I've made the fix on my
local system but don't know where to check it (RC or Dev) yet. I don't know
if this fix will make it into the 1.33 release but here it is:
at export.hpp line 204 replace:
typedef BOOST_DEDUCED_TYPENAME mpl::eval_if<
is_abstract<T>,
mpl::identity<abstract>,
mpl::identity
::type type; return std::pair
( type::invoke(), & guid_initializer<T>::instance );
with
typedef BOOST_DEDUCED_TYPENAME mpl::eval_if<
is_abstract<T>,
mpl::identity<abstract>,
mpl::identity
::type typex; return std::pair
( typex::invoke(), & guid_initializer<T>::instance );
Note the new "x" in "typex" Robert Ramey
Robert Ramey wrote:
I've tracked this down to a borland compiler issue. I've made the fix on my local system but don't know where to check it (RC or Dev) yet. I don't know if this fix will make it into the 1.33 release but here it is:
I really think this should make it in to the RC. The whole point of RCs is to find out about problems like this before the release so they can be fixed. The test cases obviously don't pick up these issues, but real usage appears to as has been apparent over the last few days since RC1 was released. If these sorts of issues can be addressed but aren't, then what is the point of an RC period? Thanks Russell
On Aug 8, 2005, at 11:09 AM, Robert Ramey wrote:
Richard Jennings wrote:
I'm finding an apparent dependency between some non-serialization headers and the use of BOOST_CLASS_EXPORT.
If boost/optional.hpp or boost/format.hpp or boost/bind.hpp are included before BOOST_CLASS_EXPORT is used then I get the compilation error:
I've tracked this down to a borland compiler issue. I've made the fix on my local system but don't know where to check it (RC or Dev) yet. I don't know if this fix will make it into the 1.33 release but here it is:
at export.hpp line 204 replace:
typedef BOOST_DEDUCED_TYPENAME mpl::eval_if< is_abstract<T>, mpl::identity<abstract>, mpl::identity
::type type; return std::pair
( type::invoke(), & guid_initializer<T>::instance ); with
typedef BOOST_DEDUCED_TYPENAME mpl::eval_if< is_abstract<T>, mpl::identity<abstract>, mpl::identity
::type typex; return std::pair
( typex::invoke(), & guid_initializer<T>::instance ); Note the new "x" in "typex"
This looks totally harmless. Once you've tested it locally, go ahead and check it into RC_1_33_0 and we'll pick it up when I roll the final release. Doug
participants (4)
-
Douglas Gregor
-
Richard Jennings
-
Robert Ramey
-
Russell Hind