Boost logo

Boost :

From: Jason Hise (chaos_at_[hidden])
Date: 2005-11-02 19:34:48


Matt Calabrese wrote:

>On 11/2/05, Matt Calabrese <rivorus_at_[hidden]> wrote:
>
>
>>I'd personally prefer using the member function pointer as an explicit
>>template argument, allowing for the calling syntax:
>>
>>enqueue< &your_type::member_function >( your, arguments, go, here );
>>
>>Again, with proper forms having different amounts of parameters generated
>>by Boost.Preprocessor.
>>
>>
>Heh, scratch that, unless someone can actually come up with a way to provide
>that syntax in a manner which works for all types.
>
It *might* be possible if 'enqueue' were a static member instance of
some internal type and one were to severely abuse the '<' and '>'
operators. Of course, if we are going in the direction of abusing
operators we could do other things like:

active < MyType > object;

( object | MyType::Func ) ( /*args here*/ );
( object << MyType::Func ) ( /*args here*/ );

etc...

-Jason


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