|
Boost Testing : |
From: Robert Ramey (ramey_at_[hidden])
Date: 2008-04-06 11:19:26
I looked at this. I used the name BOOST_IS_ABSTRACT(T) to permit a user of
the serialization library to flag a class as abstract in the absense of
support from the compiler.
However, that is different than the usage you gave it. I looked at this
some more and
decided to do the following:
a) In the serialization library I changed BOOST_IS_ABSTRACT(T) to
BOOST_SERIALIZATION_ASSUME_ABSTRACT(T)
b) changed a boost::serializaton::is_abstract to BOOST_IS_ABSTRACT(T)
I tested this on my msvc 7.1 system ans well as msvc 9.0. With msvc 7.1
I had no problem. With vc 9.0 I had some problems.
a) Looking through the code in intrinsics.hpp it looks like at some point
BOOST_IS_ABSTRACT(T) is defined so that is resolves to
is_polymorphic. If my understanding of this is correct, its really a bad
idea.
Attached is what I want to use in the serialization library - but it won't
build on msvc 9.0. I bails at
// required by smart_cast for compilers not implementing
// partial template specialization
BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(
boost::archive::detail::basic_iarchive
)
Which sort of mystifies me.
Robert Ramey
John Maddock wrote:
> Richard Webb wrote:
>>> * BOOST_IS_ABSTRACT is now an intrinsic for some Visual C++
>>> compilers
>>> * Some other boost header defines BOOST_IS_ABSTRACT
>>> * That interferes with your BOOST_IS_ABSTRACT
>>>
>>
>> I posted about this yesterday. See
>> http://article.gmane.org/gmane.comp.lib.boost.devel/173362
>>
>> The sandia gcc 4.3.0 tests seem to be failing in the same place as
>> well.
>
> Ah, this may be my fault: several compilers support the __is_abstract
> intrinsic which I hooked up in type_traits with the BOOST_IS_ABSTRACT
> macro. I hadn't realised the macro was in use somewhere else - what's
> your use case for this?
>
> John.
begin 666 is_abstract.hpp
M(VEF;F1E9B!"3T]35%]315))04Q)6D%424].7TE37T%"4U1204-47T-,05-3
M7TA04 T*(V1E9FEN92!"3T]35%]315))04Q)6D%424].7TE37T%"4U1204-4
M7T-,05-37TA04 T*#0HO+R!-4R!C;VUP871I8FQE(&-O;7!I;&5R<R!S=7!P
M;W)T("-P<F%G;6$@;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B\O('=E(&AA=F4@
M=&\@(FUA:V4B(&]N90T*#0HO+R-I;F-L=61E(#QB;V]S="]M<&PO8F]O;"YH
M<' ^#0IN86UE<W!A8V4_at_8F]O<W0@>PT*;F%M97-P86-E('-E<FEA;&EZ871I
M;VX@>PT*(" @('1E;7!L871E/&-L87-S(%0^#0H@(" @<W1R=6-T(&ES7V%B
M<W1R86-T(#H_at_8F]O<W0Z.F9A;'-E7W1Y<&5[?3L-"GT@+R\@;F%M97-P86-E
M('-E<FEA;&EZ871I;VX-"GT@+R\@;F%M97-P86-E(&)O;W-T#0H-"B\O(&1E
M9FEN92!A(&UA8W)O('1O(&UA:V4_at_97AP;&EC:70_at_9&5S:6=N871I;VX@;V8@
M=&AI<R!M;W)E('1R86YS<&%R96YT#0HC9&5F:6YE($)/3U-47U-%4DE!3$E:
M051)3TY?05-354U%7T%"4U1204-4*%0I(" @(" @("!<#0IN86UE<W!A8V4@
M8F]O<W0@>R @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @("!<
M#0IN86UE<W!A8V4@<V5R:6%L:7IA=&EO;B![(" @(" @(" @(" @(" @(" @
M(" @(" @(" @("!<#0IT96UP;&%T93P^(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @("!<#0IS=')U8W0@:7-?86)S=')A8W0\
M8V]N<W0_at_5" ^(#H_at_8F]O<W0Z.G1R=65?='EP92![?3L@(" @(" @("!<#0I]
M?2 @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @("!<#0HO*BHO#0H-"B\O(V1E9FEN92!"3T]35%])4U]!0E-44D%#
M5"A4*2!B;V]S=#HZ<V5R:6%L:7IA=&EO;CHZ:7-?86)S=')A8W0\5#X-"@T*
M(V5N9&EF("\O($)/3U-47TE37T%"4U1204-4#0H-"B-E;F1I9B O+T)/3U-4
F7U-%4DE!3$E:051)3TY?25-?04)35%)!0U1?0TQ!4U-?2%!0#0H`
`
end