Strange declaration(templates). C++
c++, templates
Solution
It's important to see return type. So, return type of this function is reference to `char[1]`; Imagine that `f` returns something like reference to the following:
char ret[1];
For example
template<typename C> static char (&f(ChT<int Fallback::*, &C::x>*))[1]
{
static char xx[1] = {'F'};
return xx;
}
Problem
How can I understand what is declared here: (this is taken from another post on this forum) ``` template<typename C> static char (&f(ChT<int Fallback::*, &C::x>*))[1]; ``` Here's how I read: template of static function `f` called with `(ChT<int Fallback::*, &C::x>*)`, but then I can't make sense why is there an address-of operator and why is there an array? I'm still learning how to understand C++ declarations, so please explain this slowly and carefully.