|
Boost : |
From: Jeremy Siek (jsiek_at_[hidden])
Date: 2001-03-19 12:03:41
Hi Steven,
Upon closer inspection, I don't think there's a way to get projection
iterator to handle a value_type that is an abstract base class. However,
there is a workaround. Instead of using the projection_iterator_generator,
you can directly use iterator_adaptor. You will need to specify a "bogus"
(but harmless) type for the value_type of the iterator. This is harmless
because, even if you did use Abstract as the value_type, any algorithm
using that type (and not the pointer or reference to it instead) would run
into problems.
boost::iterator_adaptor<AbstractMap::iterator,
boost::projection_iterator_policies<GetReference>,
char, // dummy value_type
Abstract&, Abstract*, std::input_iterator_tag>
I had to roll back the changes I had made to named_template_params.hpp,
so you'll need to update again.
Ciao,
Jeremy
On Mon, 19 Mar 2001, Steven Kirk wrote:
steven> > Thanks Jeremy, I've updated from the CVS, though this seems to have
steven> > introduced more problems:
steven> >
steven> I should point out that the errors described in my last message were the
steven> ones I was getting after including "cv_if.hpp". The code plain from the CVS
steven> gives me the following:
steven>
steven> --
steven> [C++ Error] named_template_params.hpp(106): E2139 Declaration missing ;
steven> [C++ Error] named_template_params.hpp(108): E2090 Qualifier 'IsNamedParam'
steven> is not a class or namespace name
steven> [C++ Error] named_template_params.hpp(108): E2090 Qualifier 'IsNamedParam'
steven> is not a class or namespace name
steven> [C++ Error] named_template_params.hpp(108): E2090 Qualifier 'IsNamedParam'
steven> is not a class or namespace name
steven> [C++ Error] named_template_params.hpp(108): E2090 Qualifier 'IsNamedParam'
steven> is not a class or namespace name
steven> [C++ Fatal Error] settingvalue.h(39): F1004 Internal compiler error at
steven> 0x12888b8 with base 0x1200000
steven>
steven>
steven>
steven> List-Unsubscribe: <mailto:boost-unsubscribe_at_[hidden]>
steven>
steven>
steven> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
steven>
steven>
steven>
----------------------------------------------------------------------
Jeremy Siek www: http://www.lsc.nd.edu/~jsiek/
Ph.D. Candidate email: jsiek_at_[hidden]
Univ. of Notre Dame work phone: (219) 631-3906
----------------------------------------------------------------------
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk