
25 Jul
2008
25 Jul
'08
11:38 p.m.
Giovanni Piero Deretta wrote:
I think that the biggest problem is that, if T is movable, you cannot statically guarantee that T is never accessed in an empty state, so the never empty guarantee is not as useful.
You can only move from rvalues. Rvalues cannot be accessed later on. If they're not real rvalues, that means casting was used. Which should then make it explicit that trying to access it later on is undefined behaviour as far as the implementation of the type is concerned.