What is the type of an ‘auto’ return type when returning *this in an anonymous class?

What is type of auto in here ?

The type is decltype(m_some_class) – I.e., the return value is of the same type as the variable m_some_class.


Note that the function will return a copy of *this.

If a reference to *this is wanted instead, you can use
auto& or, since C++14, the more generic decltype(auto).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)