Boost logo

Boost :

Subject: Re: [boost] [intro] Preview: Introspection library
From: Sohail Somani (sohail_at_[hidden])
Date: 2010-06-28 09:32:12


On 10-06-28 8:00 AM, Stefan Strasser wrote:
>
> template<class Mapping>
> friend void introspect(Mapping mapping,type<A>){
> mapping
> (base_class<A_base>() )
> (member<A,int ,&A::m_a>() )
> (member<A,float ,&A::m_b>() )
> (member<A,std::vector<int>,&A::m_vec>())
> ();
> }

I think a library like this would be useful.

Isn't it simpler to specialize a template? Why does this need to be done
at run-time? How do you introspect a type's constructors?

Thanks and good luck.

Sohail
(where did my signature file go?)


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