
2 Feb
2012
2 Feb
'12
7:51 p.m.
On 02.02.2012, at 15:18, Beman Dawes wrote:
On Tue, Jan 31, 2012 at 11:33 AM, Thorsten Ottosen <thorsten.ottosen@dezide.com> wrote:
I guess with the new & (I don't know of any compilers that have implemented it yet) feature we could have these overloads in path:
const string& string() const; string string() const &&;
so when a temporary path object is returned from path::extension(), the second overload is selected.
Interesting! I'm clueless about that use of &&. Need to do some reading.
I'm pretty sure that's ill-formed. The first overload must be const string& string() const &; because you cannot overload solely based on "one version has a ref-qualifier, the other doesn't". Sebastian