I hereby claim:
- I am taketwo on github.
- I am alexandrov (https://keybase.io/alexandrov) on keybase.
- I have a public key ASBxy3fFjxH0eYlEyB9wID155PCSPNioAuApKqPaPful_wo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
// Create a metafunction "has_xxx_method" that can be used | |
// to check if a class has a method called "xxx". Note the | |
// limitation: only existence of parameterless methods can | |
// be checked this way. | |
// Credits: http://stackoverflow.com/a/21827727/1525865 | |
#define HAS_METHOD_DEF(xxx) \ | |
template<typename T> \ | |
constexpr auto has_ ## xxx ## _method(int) \ | |
-> decltype(std::declval<T>(). xxx (), bool()) \ | |
{ return true; } \ |