|
Boost : |
Subject: Re: [boost] Review manager needed for TTI library
From: Edward Diener (eldiener_at_[hidden])
Date: 2011-05-09 16:16:14
On 5/9/2011 2:59 PM, Thomas Heller wrote:
> On Monday, May 09, 2011 08:39:33 PM Edward Diener wrote:
>> I am looking for a review manager for my TTI library in the review queue.
>>
>> The TTI library, which is an abbreviation for the 'Type Traits
>> Introspection' library, allows a programmer to introspect at compile
>> time the inner elements of a C++ type. The introspection process depends
>> on specifying the name of the inner element by different macros for
>> different types of elements, and then using a generated metafunction to
>> determine whether that element exists within the enclosing type. The
>> inner elements which can be introspected are type, class template,
>> member data, member function, static member data, and static member
>> function.
>
> Short query about a specific feature I am interested in.
> Will your library enable the following usecase:
>
> struct foo
> {
> template<typename Sig>
> struct result;
>
> template<typename This, typename A0, typename A1>
> struct result<This(A0, A1)>
> {
> typedef A0;
> };
> };
>
> struct bar
> {
> template<typename A0, typename A1>
> struct result<A0, A1>
> {
> typedef A0;
> };
> };
>
> has_old_result<foo, A1, A2>::type // evaluates to false
> has_old_result<bar, A1, A2>::type // evaluates to true
>
> also supporting "variadic" result_of protocol detection.
> I failed to come up with a generic solution to that particular problem. Would be
> awesome if you solved it :)
I do not understand what you are doing above. Maybe if you explained
what you are trying to do I can answer.
The TTI library can introspect a type to find out what constructs are
nested within that type at compile-time, given the name of the construct
at a minimum. That is the full extend of what the library does. The only
type of inner construct it can not introspect is a function template,
but I explain why that can't be done in the Help.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk