MJ wrote:
Hi
You can not overload the function based on the return type, even though
the return type is included in the signature
From the C++ standard:
1.3.10 signature defns.signature]
the information about a function that participates in overload resolution
(13.3): the types of its parameters and, if the function is a class member,
the cv- qualifiers (if any) on the function itself and the class in which
the member function is declared.2) The signature of a template function
specialization includes the types of its template arguments (14.5.5.1).
[...]
2) Function signatures do not include return type, because that does not
participate in overload resolution.