Boost logo

Boost :

From: Brock Peabody (brock.peabody_at_[hidden])
Date: 2003-11-13 15:35:46

Is anyone interested in a generic facility for member detection? I couldn't
find anything in boost to do it (though there was some discussion about it a
while ago: What
I've got looks like:

For types:


   struct s { typedef s result_type; };
   struct t {};


For member functions

      f, //name
      int, //return type
      (2, (int, double)), //parameters
      0 //0 if not const

   struct s { int f(int,double); };
   struct t { typedef int f; };
   struct u {};
   struct v { int f(int,double) const; };


The same thing could be done for data members, static functions, and static

It's not the prettiest thing in the world, and function signatures have to
match exactly, but if any of you think its better than doing it by hand
every time I'll post the code and some documentation.


Boost list run by bdawes at, gregod at, cpdaniel at, john at