On 2009-12-15 23:02:36 -0500, "Steven Schveighoffer"
<[email protected]> said:
First, the proposal as I see it is to compile *one* copy of doSomething
(see points 5 and 6 in the DIP description). Second, inout (or
vconst) implicitly casts to const, so it can call any functions that
require const *or* that require inout.
I see. Well that could work, as long as we don't mix shared with it.
Third, and this is kind of a nitpick, inout functions should *require*
inout in the return type, otherwise, there's no point, the qualifier
could just be const :) So your example is technically invalid.
Should it? I think it'd be better to allow it anyway for generic
programming... or at least allow inout(void) as the return type.
--
Michel Fortin
[email protected]
http://michelf.com/