Boost logo

Boost :

From: Rani Sharoni (rani_sharoni_at_[hidden])
Date: 2003-01-29 11:25:01


"John Maddock" <jm_at_[hidden]> wrote in message
news:014601c2c79c$f53f7f00$8e3687d9_at_1016031671...
> > Before changing the documentation please consider the following improved
> > implemetation that overcomes ambiguity and access control issues of the
> > current is_base_and_derived implemetation (I lately posted it to
> c.l.c++.m)
>
> That's really interesting, but I can't get to work with the compilers I
have
> access to (Borland/gcc), I've attached a modified version that at least
> compiles with these compilers, but it doesn't produce the correct results:
>
> Running 1 test case...
> Platform: Cygwin
> Compiler: GNU C++ version 3.2 20020927 (prerelease)
> STL : GNU libstdc++ version 20020927
> Boost : 1.30.0
> is_base_and_derived_test.cpp(109): error in "is_base_and_derived": The
> [...]
> Test suite "Type Traits" failed with:
> 15 assertions out of 20 passed
> 5 assertions out of 20 failed
>
> Test case "is_base_and_derived" failed with:
> 15 assertions out of 20 passed
> 5 assertions out of 20 failed
>
>
> Any ideas, or results from other compilers?

I tried to complie the code you attached (with boost 1.29.0) but some files
were missing (test.hpp, check_integral_constant.hpp,
TYPE_TRAITS(is_base_and_derived)).
As mentioned in the c.l.c++.m posting (http://tinyurl.com/51a5) I complied
the original code with Comeau C/C++ 4.3.0.1 and VC7.1 beta.

I was able to complie the attached code (with minor improvment) using strict
Comeau and VC7.1 and boost 1.29.0.

Rani

begin 666 is_base_and_derived2.hpp
M#0HO+R H0RD_at_0V]P>7)I9VAT(%-T979E($-L96%R>2P_at_0F5M86X@1&%W97,L
M($AO=V%R9"!(:6YN86YT("8_at_2F]H;B!-861D;V-K(#(P,# N#0HO+R!097)M
M:7-S:6]N('1O(&-O<'DL('5S92P@;6]D:69Y+"!S96QL(&%N9"!D:7-T<FEB
M=71E('1H:7,@<V]F='=A<F4@:7,@#0HO+R!G<F%N=&5D('!R;W9I9&5D('1H
M:7,@8V]P>7)I9VAT(&YO=&EC92!A<'!E87)S(&EN(&%L;"!C;W!I97,N(%1H
M:7,@<V]F='=A<F4@#0HO+R!I<R!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F5D+"!4*3L@(" @#0H@(" @<W1A=&EC(&YO("!C:&5C
M:RA"87-E+"!I;G0I.PT*#0H@(" @<W1R=6-T($,-"B @("![#0H@(" @(" @
M(&]P97)A=&]R($)A<V4H*2!C;VYS=#L-"B @(" @(" @;W!E<F%T;W(@1&5R
M:79E9"@I.PT*(" @('T[#0H-"B @("!S=&%T:6,@0R!G971#*"D[#0IP=6)L
M:6,Z#0H@(" @0D]/4U1?4U1!5$E#7T-/3E-404Y4*&)O;VPL('9A;'5E(#T-
M"B @(" @(" @<VEZ96]F*&-H96-K*&=E=$,H*2P@:6YT*"DI*2 ]/2!S:7IE
M;V8H>65S*0T*(" @("D[#0I].PT*#0IT96UP;&%T92 \='EP96YA;64_at_0F%S
M92P@='EP96YA;64_at_1&5R:79E9#X-"G-T<G5C="!I<U]B87-E7V%N9%]D97)I
M=F5D7VEM<&P-"GL-"B @($)/3U-47U-4051)0U]#3TY35$%.5"AB;V]L+"!V
M86QU92 ]#0H@(" @(" H.CIB;V]S=#HZ='EP95]T<F%I=',Z.FEC95]A;F0\
M#0H@(" @(" @(" Z.F)O;W-T.CID971A:6PZ.FES7V)A<V5?86YD7V1E<FEV
M961?:6UP;#(\0F%S92!C;VYS="!V;VQA=&EL92 J+"!$97)I=F5D(&-O;G-T
M('9O;&%T:6QE("H^.CIV86QU92P-"B @(" @(" @(#HZ8F]O<W0Z.FES7V-L
M87-S/$1E<FEV960^.CIV86QU92P-"B @(" @(" @(#HZ8F]O<W0Z.FES7V-L
M87-S/$)A<V4^.CIV86QU90T*(" @(" @/CHZ=F%L=64I#0H@(" I.PT*?3L-
M"@T*?2 O+R!N86UE<W!A8V4_at_9&5T86EL#0H-"D)/3U-47U147T%56%]"3T],
M7U1204E47T1%1C(H#0H@(" @("!I<U]B87-E7V%N9%]D97)I=F5D#0H@(" @
M+"!"87-E#0H@(" @+"!$97)I=F5D#0H@(" @+" H.CIB;V]S=#HZ9&5T86EL
M.CII<U]B87-E7V%N9%]D97)I=F5D7VEM<&P\0F%S92Q$97)I=F5D/CHZ=F%L
M=64I#0H@(" @*0T*#0HC:69N9&5F($)/3U-47TY/7U1%35!,051%7U!!4E1)
M04Q?4U!%0TE!3$E:051)3TX-"D)/3U-47U147T%56%]"3T],7U1204E47U!!
M4E1)04Q?4U!%0S)?,BAT>7!E;F%M92!"87-E+'1Y<&5N86UE($1E<FEV960L
M:7-?8F%S95]A;F1?9&5R:79E9"Q"87-E)BQ$97)I=F5D+&9A;'-E*0T*0D]/
M4U1?5%1?05587T)/3TQ?5%)!251?4$%25$E!3%]34$5#,E\R*'1Y<&5N86UE
M($)A<V4L='EP96YA;64_at_1&5R:79E9"QI<U]B87-E7V%N9%]D97)I=F5D+$)A
M<V4L1&5R:79E9"8L9F%L<V4I#0I"3T]35%]45%]!55A?0D]/3%]44D%)5%]0
M05)424%,7U-014,R7S(H='EP96YA;64_at_0F%S92QT>7!E;F%M92!$97)I=F5D
M+&ES7V)A<V5?86YD7V1E<FEV960L0F%S928L1&5R:79E9"8L9F%L<V4I#0HC
M96YD:68-"@T*?2 O+R!N86UE<W!A8V4_at_8F]O<W0-"@T*(VEN8VQU9&4@(F)O
M;W-T+W1Y<&5?=')A:71S+V1E=&%I;"]B;V]L7W1R86ET7W5N9&5F+FAP<"(-
M"@T*(V5N9&EF("\O($)/3U-47U147TE37T)!4T5?04Y$7T1%4DE6141?2%!0
M7TE.0TQ51$5$#0H-"B\J('1E<W0_at_8V%S90T*#0HC:6YC;'5D92 B:7-?8F%S
M95]A;F1?9&5R:79E9#(N:'!P(@T*#0IU<VEN9R Z.F)O;W-T.CII<U]B87-E
M7V%N9%]D97)I=F5D.PT*#0IS=')U8W0_at_0B![?3L-"G-T<G5C="!",2 Z($(@
M>WT[#0IS=')U8W0_at_0C(@.B!"('M].PT*<W1R=6-T($0_at_.B!",2P@<')I=F%T
M92!",B![?3L-"@T*='EP961E9B!C:&%R(%1E<W1;:7-?8F%S95]A;F1?9&5R
M:79E9#Q"+"!$/CHZ=F%L=65=.PT*='EP961E9B!C:&%R(%1E<W1;:7-?8F%S
M95]A;F1?9&5R:79E9#Q",2Q$/CHZ=F%L=65=.PT*='EP961E9B!C:&%R(%1E
M<W1;:7-?8F%S95]A;F1?9&5R:79E9#Q",BQ$/CHZ=F%L=65=.PT*='EP961E
M9B!C:&%R(%1E<W1;(6ES7V)A<V5?86YD7V1E<FEV960\:6YT+$0^.CIV86QU
M95T[#0IT>7!E9&5F(&-H87(@5&5S=%LA:7-?8F%S95]A;F1?9&5R:79E9#Q$
6+$0^.CIV86QU95T[#0H-"BHO#0H-"@``
`
end


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk