Boost logo

Boost Users :

From: Noah Roberts (roberts.noah_at_[hidden])
Date: 2007-01-22 13:05:40


Ovanes Markarian wrote:
> Just a small addition. You can also specialize the template in another
> file, that is seen in the translation unit. But anyway you need to
> specialize it. I hope with a new C++09 standard (it is still pretty far
> away), it will be possible to inspect if a class has a specific member
> function (using typeof or decltype operators). Currently it is only
> possible with has_xxx macros.

http://unitlib.svn.sourceforge.net/viewvc/unitlib/trunk/include/unitlib/metafunc/is_quantity_operand.hpp?revision=6&view=markup

A meta function that is composed of two meta functions that check for
the existence of a function with a particular signature in the passed in
type and for the existence of a typedef of a particular name. Uses
SFINAE for testing mechanics.

I don't know that this would help with the OP's problem except to make
sure there is a smart pointer that responds to a particular interface.
If that is what is needed then something like that would help.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net