FW: Compilation problem with boost on SunCC (Forte 6.2 & 8)
A repost, since no answer to my previous mail.
-----Original Message----- From: Puverle, Tomas (IT) Sent: 01 October 2004 15:05 To: 'boost@lists.boost.org' Subject: Compilation problem with boost on SunCC (Forte 6.2 & 8)
Please find attached a small program and a the resulting compilation errors on SunCC. This occurs in iterator_facade.hpp, operator != (), calling to interator_core_access::equal. I have tracked this down to the following problem:
f(mpl::true_); f(mpl::false_);
f(is_convertible<>()); //will not work
is_convertible<> derives from mpl::bool<>, however it seems that a bug in the compiler prevents it from converting to mpl::true_/mpl::false_ in the above scenario (and in the program attached)
A workaround for this is to change it to the following:
f(mpl::true_); f(mpl::false_);
f(mpl::bool_
::value>()); Presumably this will be present in other places but this is the only one our developers have hit so far.
Thanks,
Tom
NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited.
Puverle, Tomas writes:
Please find attached a small program and a the resulting compilation errors on SunCC. This occurs in iterator_facade.hpp, operator != (), calling to interator_core_access::equal. I have tracked this down to the following problem:
f(mpl::true_); f(mpl::false_);
f(is_convertible<>()); //will not work
is_convertible<> derives from mpl::bool<>,
Actually, on SunCC, it doesn't -- see lines 19-24 in "boost/type_trais/detail/bool_trait_def.hpp": #if defined(__SUNPRO_CC) # define BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::bool_< C > type; \ enum { value = type::value }; \ /**/ # define BOOST_TT_AUX_BOOL_C_BASE(C) I'd say it's a bug. Would you mind applying the attached patch to the aformentioned header and reporting back whether it fixes the problem or not? -- Aleksey Gurtovoy MetaCommunications Engineering
Actually, on SunCC, it doesn't -- see lines 19-24 in "boost/type_trais/detail/bool_trait_def.hpp":
Yes, I don't know how I missed that. The problem still remains the same. ;)
#if defined(__SUNPRO_CC) # define BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::bool_< C > type; \ enum { value = type::value }; \ /**/ # define BOOST_TT_AUX_BOOL_C_BASE(C)
This doesn't work. BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE is not recognised in my version of boost (1.31.0). Presumably it's something that was added later, but just replacing it with mpl:: resolves that problem. However, the original errors remain. Commenting out # define BOOST_TT_AUX_BOOL_C_BASE(C) to allow the derivation fixes the problem, though. Thanks, Tom
Tomas Puverle writes:
Actually, on SunCC, it doesn't -- see lines 19-24 in "boost/type_trais/detail/bool_trait_def.hpp":
Yes, I don't know how I missed that. The problem still remains the same. ;)
#if defined(__SUNPRO_CC) # define BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::bool_< C > type; \ enum { value = type::value }; \ /**/ # define BOOST_TT_AUX_BOOL_C_BASE(C)
This doesn't work. BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE is not recognised in my version of boost (1.31.0).
Oh, sorry, for some reason I assumed you are using the latest CVS version.
Presumably it's something that was added later,
Yep.
but just replacing it with mpl:: resolves that problem. However, the original errors remain.
OK; thanks for trying it out.
Commenting out # define BOOST_TT_AUX_BOOL_C_BASE(C) to allow the derivation fixes the problem, though.
Hmm, interesting. Sun definitely used to have problems with inheritance here. On the second thought, I think we didn't try this particular version of it: inheriting from 'bool_' and while still explicitly defining nested '::type/::value' members. In any case, since it works for you, I'd be happy to patch this in the CVS once you provide me with __SUNPRO_CC value to check against. -- Aleksey Gurtovoy MetaCommunications Engineering
participants (3)
-
Aleksey Gurtovoy
-
Puverle, Tomas (IT)
-
Tomas Puverle