Quote Originally Posted by superbonzo View Post
have you tried "auto get_c() const -> decltype(f(c)) { return f(c); }" or the more explicit "auto get_c() const -> decltype(f( this->c )) { return f(c); }" instead ?
The first makes no difference.

The second gives the error "invalid use of 'this' at top level".

Perhaps it's just my compiler that doesn't support this feature fully? I am using g++ 4.4.