Boost logo

Boost :

Subject: [boost] Is there interest in a library for testing existence of a function member of class?
From: ºúά (huwei04_at_[hidden])
Date: 2014-11-22 04:36:40

I am looking for how to test if a function member of class exist or not in compile time.I did not find a solution by google so I wrote a piece of code for it.Please let me know if it's already in boost. :)
class Bar
class Foo
  int foo(Bar);

// create struct 'has_foo' which is used to test function member 'foo'.HAS_FUNCTION_MEMBER(foo)
int main()
   return 0;
The code is in my gist
The code only checks if the function is compatible with expected, but not require to be exact same.


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