The most recent time I needed something like this, I wanted to test whether a struct contained a field with a particular name that was convertible to a float (I think float or int16_t in that case). I would have been happy with a test for a field with that name of any type. But I couldn't work out how to do it. Any ideas?
I think below code(incomplete) can test a field with a name of any type.
template <int c>struct enable{ typedef void type;};
template <typename T>struct wrapper{ static T value;};
template