There's no way in general to know whether a function that takes a `T &` 
consumes it, other than by inspecting its implementation. I believe the 
conservatively-correct thing to do is to assume that such functions do not 
consume, and that's what we already do here.

  If we have attributes to allow people to annotate their custom `move` 
implementations, I think our position is already reasonable here. Maybe we 
could add a warning when analysis of the implementation of a function 
determines that it consumes one of its by-lvalue-reference parameters and it 
lacks the attribute?

http://llvm-reviews.chandlerc.com/D2872
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to