
31 Jan
2012
31 Jan
'12
4:33 p.m.
Den 31-01-2012 14:47, Stephan T. Lavavej skrev:
[Thorsten Ottosen]
However, consider
* Replace string with wstring, and this becomes problematic on Windows.
Yep.
* Additionally, returning const values like const string/const wstring inhibits move semantics.
True, but on the specific platform it would be faster to get a refence than copy+move. 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. -Thorsten