22 Nov
2014
22 Nov
'14
9:36 a.m.
Hi,
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. :)
Synopsis
class Bar
{
public:
Bar(int);
};
class Foo
{
public:
Foo(int);
int foo(Bar);
};
// create struct 'has_foo' which is used to test function member 'foo'.HAS_FUNCTION_MEMBER(foo)
int main()
{
assert((!has_foo