Boost logo

Boost :

Subject: Re: [boost] [intro] Preview: Introspection library
From: Larry Evans (cppljevans_at_[hidden])
Date: 2010-06-28 10:02:57


On 06/28/10 07:00, Stefan Strasser wrote:
> Hi,
>
> I'd be interested in comments on an introspection library I've been
> developing.
>
[snip]

Could this library be used to implement a class metafunction template:

   template<typename T>
   gcptr_locations
   {
          typedef
        vector_c
          < std::ptrdiff_t
          , offset0
          , offset1
          ...
          , offsetn
>
       gcptr_offsets
       ;
   };

where gcptr_offsets would contain the offsets from the start of
a T to the location of all the:

   template<typename S> struct gcptr;

contained within T? gcptr<S> might be, for instance, a smart
pointer to an S. This would be useful for garbage collection.

BTW, based on just the class name, the code:

https://svn.boost.org/trac/boost/browser/sandbox/intro/boost/intro/detail/indent_streambuf.hpp

could be replaced with that here:

https://svn.boost.org/trac/boost/browser/sandbox/variadic_templates/boost/iostreams/utility/indent_scoped_ostreambuf.hpp

An example of its use is here:

https://svn.boost.org/trac/boost/browser/sandbox/variadic_templates/libs/composite_storage/sandbox/pack/one_of_multiple_dispatch.test.cpp


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