|
Boost Users : |
From: Robert Ramey (ramey_at_[hidden])
Date: 2007-01-22 13:53:15
Marc Wäckerlin wrote:
> Brian Stempel wrote:
> Now I started by reading the "Serialization Archive Class Reference"
> on http://boost.org/libs/serialization/doc/archive_reference.html,
> which describes how to implement my own archive.
>
> Unfortunately, if I copy the code from the "simplest possible output
> archive" there into a header file, then write a code file that does
> nothing except including that header, the result is not compilable
> (GNU g++ 4.1.2).
>
> First problem:
>
> friend class boost::archive::load_access is undefined, so I have to
> add a forward declaration:
> namespace boost {
> namespace archive {
> class load_access;
> }
> }
Hmm - I looked at this again and didn't see the need for the above.
In fact, when I compiled with my other compilers - none complained.
So, though its harmless to add - I'm not sure it should be in the
example.
> Second problem (see attached test.cpp):
In compiling your/my example from the document with VC 7.1 - though
not with the other compilers at hand, I did get an error - which was
a surprise to me. However, its a different error than the one you get.
Also none of my other compilers had a problem with this.
So my real answer to your question "What's missing?" is
"I don't know". Both your error message from gcc 4.1 and
mine from VC 7.1 - which are different - can't be explained
by me. So I would say we'll have to call this "under investigation"
Adding more "#includes" might seem to fix the problem. But
the point of the example is to show what a minimal example
is - so I'm really curious as to what is going on.
You might try replacing your versions of the attached
files with the attached one and let me know what happens.
Robert Ramey
>
>> g++ test.cpp
> /usr/include/boost/archive/detail/interface_iarchive.hpp: In member
> function 'const boost::archive::detail::basic_pointer_iserializer*
> boost::archive::detail::interface_iarchive<Archive>::register_type(T*)':
> /usr/include/boost/archive/detail/interface_iarchive.hpp:54:
> error: 'instantiate_pointer_iserializer' is not a member
> of 'boost::archive::detail'
> /usr/include/boost/archive/detail/interface_iarchive.hpp:58: error:
> invalid use of undefined type 'const struct
> boost::archive::detail::basic_pointer_iserializer'
> /usr/include/boost/archive/detail/basic_iarchive.hpp:41: error:
> forward declaration of 'const struct
> boost::archive::detail::basic_pointer_iserializer'
>
> What's missing?
>
>
> Thank you
> Regards
> Marc
>
>
>
>> _______________________________________________
>> Boost-users mailing list
>> Boost-users_at_[hidden]
>> http://lists.boost.org/mailman/listinfo.cgi/boost-users
begin 666 interface_iarchive.hpp
M(VEF;F1E9B!"3T]35%]!4D-(259%7T1%5$%)3%])3E1%4D9!0T5?24%20TA)
M5D5?2%!0#0HC9&5F:6YE($)/3U-47T%20TA)5D5?1$5404E,7TE.5$521D%#
M15])05)#2$E615](4% -"@T*+R\@35,@8V]M<&%T:6)L92!C;VUP:6QE<G,@
M<W5P<&]R=" C<')A9VUA(&]N8V4-"B-I9B!D969I;F5D*%]-4T-?5D52*2 F
M)B H7TU30U]615(@/CT@,3 R,"D-"B,@<')A9VUA(&]N8V4-"B-E;F1I9_at_T*
M#0HO+R\O+R\O+R\Q+R\O+R\O+R\O,B\O+R\O+R\O+S,O+R\O+R\O+R\T+R\O
M+R\O+R\O-2\O+R\O+R\O+S8O+R\O+R\O+R\W+R\O+R\O+R\O. T*+R\@:6YT
M97)F86-E7VEA<F-H:79E+FAP< T*#0HO+R H0RD_at_0V]P>7)I9VAT(#(P,#(@
M4F]B97)T(%)A;65Y("T@:'1T<#HO+W=W=RYR<G-D+F-O;2 N( T*+R\@57-E
M+"!M;V1I9FEC871I;VX_at_86YD(&1I<W1R:6)U=&EO;B!I<R!S=6)J96-T('1O
M('1H92!";V]S="!3;V9T=V%R90T*+R\@3&EC96YS92P_at_5F5R<VEO;B Q+C N
M("A3964_at_86-C;VUP86YY:6YG(&9I;&4_at_3$E#14Y315\Q7S N='AT(&]R(&-O
M<'D_at_870-"B\O(&AT=' Z+R]W=W<N8F]O<W0N;W)G+TQ)0T5.4T5?,5\P+G1X
M="D-"@T*+R\@(%-E92!H='1P.B\O=W=W+F)O;W-T+F]R9R!F;W(@=7!D871E
M<RP_at_9&]C=6UE;G1A=&EO;BP_at_86YD(')E=FES:6]N(&AI<W1O<GDN#0HC:6YC
M;'5D92 \<W1R:6YG/@T*(VEN8VQU9&4@/&)O;W-T+V-S=&1I;G0N:'!P/@T*
M(VEN8VQU9&4@/&)O;W-T+VUP;"]B;V]L+FAP<#X-"B-I;F-L=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VQU9&4@/&)O;W-T+V%R8VAI=F4O9&5T86EL+V%B:5]S=69F
M:7_at_N:'!P/B O+R!P;W!S(&%B:5]S=69F:7_at_N:'!P('!R86=M87,-"@T*(V5N
M9&EF("\O($)/3U-47T%20TA)5D5?1$5404E,7TE.5$521D%#15])05)#2$E6
'15](4% -"@``
`
end
begin 666 basic_iarchive.hpp
M(VEF;F1E9B!"3T]35%]!4D-(259%7T1%5$%)3%]"05-)0U])05)#2$E615](
M4% -"B-D969I;F4_at_0D]/4U1?05)#2$E615]$151!24Q?0D%324-?24%20TA)
M5D5?2%!0#0H-"B\O($U3(&-O;7!A=&EB;&4_at_8V]M<&EL97)S('-U<'!O<G0@
M(W!R86=M82!O;F-E#0HC:68_at_9&5F:6YE9"A?35-#7U9%4BD@)B8@*%]-4T-?
M5D52(#X](#$P,C I#0HC('!R86=M82!O;F-E#0HC96YD:68-"@T*+R\O+R\O
M+R\O,2\O+R\O+R\O+S(O+R\O+R\O+R\S+R\O+R\O+R\O-"\O+R\O+R\O+S4O
M+R\O+R\O+R\V+R\O+R\O+R\O-R\O+R\O+R\O+S_at_-"B\O(&)A<VEC7VEA<F-H
M:79E+FAP<#H-"@T*+R\@*$,I($-O<'ER:6=H=" R,# R(%)O8F5R="!286UE
M>2 M(&AT=' Z+R]W=W<N<G)S9"YC;VT@+B -"B\O(%5S92P@;6]D:69I8V%T
M:6]N(&%N9"!D:7-T<FEB=71I;VX@:7,@<W5B:F5C="!T;R!T:&4_at_0F]O<W0@
M4V]F='=A<F4-"B\O($QI8V5N<V4L(%9E<G-I;VX@,2XP+B H4V5E(&%C8V]M
M<&%N>6EN9R!F:6QE($Q)0T5.4T5?,5\P+G1X="!O<B!C;W!Y(&%T#0HO+R!H
M='1P.B\O=W=W+F)O;W-T+F]R9R],24-%3E-%7S%?,"YT>'0I#0H-"B\O("!3
M964@:'1T<#HO+W=W=RYB;V]S="YO<F<@9F]R('5P9&%T97,L(&1O8W5M96YT
M871I;VXL(&%N9"!R979I<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QI>F5D
M(&]B:F5C=',@9G)O;2!A(&EN<'5T('-T<F5A;0T*8VQA<W,@0D]/4U1?05)#
M2$E615]$14-,*$)/3U-47U!07T5-4%19*"DI(&)A<VEC7VEA<F-H:79E( T*
M>PT*(" @(&9R:65N9"!C;&%S<R!B87-I8U]I87)C:&EV95]I;7!L.PT*(" @
M("\O(&AI9&4@:6UP;&5M96YT871I;VX@;V8@=&AI<R!C;&%S<R!T;R!M:6YI
M;6EZ92!H96%D97(@8V]N8VQU<VEO;@T*(" @("\O(&EN(&-L:65N="!C;V1E
M+B!)(&-O=6QD;B=T('5S960@<V-O<&5D('!O:6YT97(@=VET:"!B;W)L86YD
M#0H@(" @+R\@8F]O<W0Z.G-C;W!E9%]P='(\8F%S:6-?:6%R8VAI=F5?:6UP
M;#X@<&EM<&P[#0H@(" @8F%S:6-?:6%R8VAI=F5?:6UP;" J('!I;7!L.PT*
M#0H@(" @=FER='5A;"!V;VED('9L;V%D*'9E<G-I;VY?='EP92 F="D@/2 @
M,#L-"B @("!V:7)T=6%L('9O:60@=FQO860H;V)J96-T7VED7W1Y<&4@)G0I
M(#T@(# [#0H@(" @=FER='5A;"!V;VED('9L;V%D*&-L87-S7VED7W1Y<&4@
M)G0I(#T@(# [#0H@(" @=FER='5A;"!V;VED('9L;V%D*&-L87-S7VED7V]P
M=&EO;F%L7W1Y<&4@)G0I(#T@,#L-"B @("!V:7)T=6%L('9O:60@=FQO860H
M8VQA<W-?;F%M95]T>7!E("9T*2 ](# [#0H@(" @=FER='5A;"!V;VED('9L
M;V%D*'1R86-K:6YG7W1Y<&4@)G0I(#T@,#L-"G!R;W1E8W1E9#H-"B @("!B
M87-I8U]I87)C:&EV92AU;G-I9VYE9"!I;G0_at_9FQA9W,I.PT*(" @("\O(&%C
M8V]U;G0_at_9F]R(&)O9W5S(&=C8R!W87)N:6YG#0H@(" @(VEF(&1E9FEN960H
M7U]'3E5#7U\I#0H@(" @=FER='5A; T*(" @("-E;F1I9_at_T*(" @('YB87-I
M8U]I87)C:&EV92_at_[hidden]*<'5B;&EC._at_T*(" @("\O(&YO=&4Z($Y/5"!P87)T
M(&]F('1H92!P=6)L:6,@05!)+@T*(" @('9O:60@;F5X=%]O8FIE8W1?<&]I
M;G1E<BAV;VED("IT*3L-"B @("!V;VED(')E9VES=&5R7V)A<VEC7W-E<FEA
M;&EZ97(H8V]N<W0_at_8F%S:6-?:7-E<FEA;&EZ97(@)B!B:7,I.PT*(" @('9O
M:60@;&]A9%]O8FIE8W0H#0H@(" @(" @('9O:60@*G0L( T*(" @(" @("!C
M;VYS="!B87-I8U]I<V5R:6%L:7IE<B F(&)I<PT*(" @("D[#0H@(" @8V]N
M<W0_at_0D]/4U1?05)#2$E615]$14-,*$)/3U-47U!07T5-4%19*"DI(&)A<VEC
M7W!O:6YT97)?:7-E<FEA;&EZ97(@*B -"B @("!L;V%D7W!O:6YT97(H#0H@
M(" @(" @('9O:60@*B F('0L( T*(" @(" @("!C;VYS="!B87-I8U]P;VEN
M=&5R7VES97)I86QI>F5R("H_at_8G!I<U]P='(L#0H@(" @(" @(&-O;G-T(&)A
M<VEC7W!O:6YT97)?:7-E<FEA;&EZ97(@*B H*F9I;F1E<BDH#0H@(" @(" @
M(" @("!C;VYS="!B;V]S=#HZ<V5R:6%L:7IA=&EO;CHZ97AT96YD961?='EP
M95]I;F9O("8_at_971I#0H@(" @(" @("D-"B @(" I.PT*(" @("\O(')E86P@
M<'5B;&EC($%022!S=&%R=',@:&5R90T*(" @('9O:60@#0H@(" @<V5T7VQI
M8G)A<GE?=F5R<VEO;BAU;G-I9VYE9"!I;G0_at_87)C:&EV95]L:6)R87)Y7W9E
M<G-I;VXI.PT*(" @('5N<VEG;F5D(&EN=" -"B @("!G971?;&EB<F%R>5]V
M97)S:6]N*"D_at_8V]N<W0[#0H@(" @=6YS:6=N960@:6YT#0H@(" @9V5T7V9L
M86=S*"D_at_8V]N<W0[#0H@(" @=F]I9" -"B @("!R97-E=%]O8FIE8W1?861D
M<F5S<RAC;VYS="!V;VED("H@;F5W7V%D9')E<W,L(&-O;G-T('9O:60@*B!O
M;&1?861D<F5S<RD[#0H@(" @=F]I9" -"B @("!D96QE=&5?8W)E871E9%]P
M;VEN=&5R<R_at_[hidden]*?3L-"@T*?2 O+R!N86UE<W!A8V4_at_9&5T86EL#0I]("\O
M(&YA;65S<&%C92!A<F-H:79E#0I]("\O(&YA;65S<&%C92!B;V]S= T*#0HO
M+R!R97%U:7)E9"!B>2!S;6%R=%]C87-T(&9O<B!C;VUP:6QE<G,@;F]T(&EM
M<&QE;65N=&EN9R -"B\O('!A<G1I86P@=&5M<&QA=&4@<W!E8VEA;&EZ871I
M;VX-"D)/3U-47T)23TM%3E]#3TU024Q%4E]465!%7U1204E44U]34$5#24%,
M25I!5$E/3B_at_-"B @("!B;V]S=#HZ87)C:&EV93HZ9&5T86EL.CIB87-I8U]I
M87)C:&EV90T**0T*#0HC:6YC;'5D92 \8F]O<W0O87)C:&EV92]D971A:6PO
M86)I7W-U9F9I>"YH<' ^("\O('!O<',@86)I7W-U9F9I>"YH<' @<')A9VUA
M<PT*#0HC96YD:68@+R]"3T]35%]!4D-(259%7T1%5$%)3%]"05-)0U])05)#
*2$E615](4% -"@``
`
end
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net