Here is the code I was looking, Source code :
template <typename T>
struct function_traits
: public function_traits<decltype(&T::operator())>
{};
if we instantiate it with some functor X i.e function_traits<X>; , That will build the base class which is function_traits<decltype(&X::operator())> due to inheritance , but to build function_traits<decltype(&X::operator())> it's base also has to be built, which could be function_traits<decltype(Z)>
I understand function_traits<X> != function_traits<Z>. Isn't that recursive inheritance? 0_o.
How all things is working together?
function_traitsfor member function pointers.