Boost logo

Boost :

Subject: Re: [boost] Review manager needed for TTI library
From: Thomas Heller (thom.heller_at_[hidden])
Date: 2011-05-09 14:59:47


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 :)

Regards,
Thomas


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