|
Boost Users : |
From: Keith MacDonald (boost_at_[hidden])
Date: 2004-01-07 07:19:00
> I was quoting the same documentation you referred to.
OK, but my quote came from the front page (index.html), so I read that
first. Perhaps that section should be rewritten.
> I'd love to. If I'm to use your code wholesale, I'll need you to
> add the standard boost copyright and license reference.
I've done that, and attach the new source. However, I hereby relinquish all
rights over baz2.cpp, so feel free to do whatever you like with it.
When I attempted to integrate the iterators with my actual code, I hit a
problem that I don't know how to resolve with iterator_facade. To
illustrate it, I've modified the example code and attach it as baz3.cpp.
Now, Node is an abstract base class, and DerivedNode is instantiated.
Compiling it results in the following error:
\CVS\boost\boost\iterator\iterator_facade.hpp(389) : error C2259:
'Node' : cannot instantiate abstract class due to following members:
'int Node::getInfo(void) const' : pure virtual function was not defined
Can your technique be used in such contexts?
Thanks,
Keith MacDonald
begin 666 baz2.cpp
M+R\@8F%Z,BYC<' Z($)I9&ER96-T:6]N86P@:71E<F%T;W(@97AA;7!L92X-
M"B\J#0I";V]S="!3;V9T=V%R92!,:6-E;G-E("T_at_5F5R<VEO;B Q+C @+2!!
M=6=U<W0@,3=T:"P@,C P,PT*#0I097)M:7-S:6]N(&ES(&AE<F5B>2!G<F%N
M=&5D+"!F<F5E(&]F(&-H87)G92P@=&\@86YY('!E<G-O;B!O<B!O<F=A;FEZ
M871I;VX-"F]B=&%I;FEN9R!A(&-O<'D@;V8@=&AE('-O9G1W87)E(&%N9"!A
M8V-O;7!A;GEI;F<@9&]C=6UE;G1A=&EO;B!C;W9E<F5D(&)Y#0IT:&ES(&QI
M8V5N<V4@*'1H92 B4V]F='=A<F4B*2!T;R!U<V4L(')E<')O9'5C92P_at_9&ES
M<&QA>2P_at_9&ES=')I8G5T92P-"F5X96-U=&4L(&%N9"!T<F%N<VUI="!T:&4@
M4V]F='=A<F4L(&%N9"!T;R!P<F5P87)E(&1E<FEV871I=F4@=V]R:W,@;V8@
M=&AE#0I3;V9T=V%R92P_at_86YD('1O('!E<FUI="!T:&ER9"UP87)T:65S('1O
M('=H;VT@=&AE(%-O9G1W87)E(&ES(&9U<FYI<VAE9"!T;PT*9&\@<V\L(&%L
M;"!S=6)J96-T('1O('1H92!F;VQL;W=I;F<Z#0H-"E1H92!C;W!Y<FEG:'0@
M;F]T:6-E<R!I;B!T:&4_at_4V]F='=A<F4_at_86YD('1H:7,@96YT:7)E('-T871E
M;65N="P@:6YC;'5D:6YG#0IT:&4_at_86)O=F4@;&EC96YS92!G<F%N="P@=&AI
M<R!R97-T<FEC=&EO;B!A;F0@=&AE(&9O;&QO=VEN9R!D:7-C;&%I;65R+ T*
M;75S="!B92!I;F-L=61E9"!I;B!A;&P_at_8V]P:65S(&]F('1H92!3;V9T=V%R
M92P@:6X@=VAO;&4@;W(@:6X@<&%R="P_at_86YD#0IA;&P_at_9&5R:79A=&EV92!W
M;W)K<R!O9B!T:&4_at_4V]F='=A<F4L('5N;&5S<R!S=6-H(&-O<&EE<R!O<B!D
M97)I=F%T:79E#0IW;W)K<R!A<F4@<V]L96QY(&EN('1H92!F;W)M(&]F(&UA
M8VAI;F4M97AE8W5T86)L92!O8FIE8W0_at_8V]D92!G96YE<F%T960_at_8GD-"F$@
M<V]U<F-E(&QA;F=U86=E('!R;V-E<W-O<BX-"@T*5$A%(%-/1E1705)%($E3
M(%!23U9)1$5$(")!4R!)4R(L(%=)5$A/550_at_5T%24D%.5%D_at_3T8@04Y9($M)
M3D0L($584%)%4U,@3U(-"DE-4$Q)140L($E.0TQ51$E.1R!"550_at_3D]4($Q)
M34E4140_at_5$\@5$A%(%=!4E)!3E1)15,@3T8_at_34520TA!3E1!0DE,2519+ T*
M1DE43D534R!&3U(@02!005)424-53$%2(%!54E!/4T4L(%1)5$Q%($%.1"!.
M3TXM24Y&4DE.1T5-14Y4+B!)3B!.3R!%5D5.5 T*4TA!3$P_at_5$A%($-/4%E2
M24=(5"!(3TQ$15)3($]2($%.64].12!$25-44DE"551)3D<@5$A%(%-/1E17
M05)%($)%($Q)04),10T*1D]2($%.62!$04U!1T53($]2($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run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net