Boost logo

Boost :

Subject: Re: [boost] help detecting presence of operator[]
From: Jeffrey Hellrung (jhellrung_at_[hidden])
Date: 2010-01-23 03:35:03


joel falcou wrote:
> Jeffrey Hellrung wrote:
>> Hi all,
>>
>> I'm trying to perform a compile-time check to determine if a class has
>> an operator[]. I'm using a "trick" I think I've seen in Adobe's
>> library and on this list in the past:
> In the vautl I uplaoded a macro to generate the needed meta-function for
> such method/operator test.
> Take a look at introspection.zip, especially the has_member_function.hpp
> file.
>

That isn't *quite* what I need. I'm aiming to detect the presence of
operator[] (or any other member function, for that matter) independent
of its precise signature (and it looks like the macros that
has_member_function.hpp defines need a signature). Do you have anything
that will help in that regard?

Thanks for the reference though, this might come in handy ;)

- Jeff


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