
John Maddock
Ovanes Markarian wrote:
For me this will clearly fail, since T::xxx is not a type but an integer member of the struct. If xxx would be a member function it would not be a type as well, so has_xxx can only determine if there is some nested class type or a typedef within the inspected type. Is this correct?
As I understand it, this traits class is intended to identify nested types only - certainly that's the only use case I've used it for.
HTH, John.
Here: http://www.rsdn.ru/forum/message/2720363.1.aspx http://www.rsdn.ru/forum/message/2759773.1.aspx presented interresting solution for detecting specific member functions without specifying function signature. It will also work for member function templates. Later version allows to check whether the call is possible. Gennadiy