Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2005-06-04 12:00:32


On 06/03/2005 08:37 AM, Tobias Schwinger wrote:
> Larry Evans wrote:
[snip]
> However, the paper very much focusses on the aspect of garbage
> collection, which is not exactly what I was talking about and seems a
Well, I was mostly thinking of the allocation aspects. Since
it was based on c++, I was guessing that it would have some useful
code. I was thinking of using it's allocator to speed-up allocation and
then enumeration of the sp_counted_base's in Dimov's:

    libs/smart_ptr/src/sp_collector.cpp

> bit out-dated in regard to the design discussion. The code is released
> under an aggressive open source license.
OOPS. I hadn't considered that.
[snip]
>> However, creating such a map for any field, not just smart pointer
>> fields, is the purpose of:
>>
>> http://cvs.sourceforge.net/viewcvs.py/boost-sandbox/boost-sandbox/boost/fields_visitor
>
>
> >
> > so I don't see that as a big problem.
>
> IIRC, I have looked at this code before. A brief example (maybe in form
> of a @code block) would be a great.

Sorry, I don't know what a @code block is; however, I've just uploaded
some test code to the vault in the:

   cppljevans/field_visitor_test/simple_record_field_traversal_test.zip

That code shows two versions of a record:

   record<visitable_not>
   record<visitable_yes>

the first contains fields<visitable_not,i> which are not visitable, the
2nd contains the the same fields except they're fields<visitable_yes,i>,
where i=0..2. This should illustrate what's needed to make a field
"visitable".

Hope you're interested ;)

-regards,
Larry

illustrate what's needed to make a field


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