Boost logo

Boost :

From: Edward Diener (eddielee_at_[hidden])
Date: 2006-02-03 17:30:20

Stefan Roiser wrote:

> Reflex does provide reflection information for template instances
> (classes, functions) and template families. An instantiated template
> class is a Reflex::Type, an instantiated template function is a
> Reflex::Member. There are two additional classes in the API
> (TypeTemplate, MemberTemplate) which will allow the user to
> introspect/interact with a template family (e.g. std::vector<T>), but
> this information only get's filled once the first template instance
> in the dictionary source code comes along.
> The TypeTemplate/MemberTemplate currently allow to loop over template
> parameters, look at parameter defaults (if any, this also needs some
> extra handling - gxxml won't give us this info) and loop over the
> instances of this template currently available in the system.

I think it is a commendable goal in Reflex to be able to reflect the
parameter types for any given template instantiation, since this
information may be valuable and usable at run-time. After all, at
run-time, information about a template type should be just as accesible
regarding finding type information than any other type. One of the
pieces of information about a template type is the parameter types which
are used to instantiate the template, so run-time reflection should
include such information. But I feel that information about the template
declaration/definition itself belongs in the realm of a compile-time
reflection system, not a run-time reflection system, and can serve no
purpose in a run-time reflection system.

Boost list run by bdawes at, gregod at, cpdaniel at, john at