
On 1 October 2011 13:47, Lorenzo Caminiti <lorcaminiti@gmail.com> wrote:
N1962 does not indicate that contracts for volatile members should be handled in any special way (in fact, volatile is not discussed at all in N1962).
In practical terms, I'm not sure I want checkable contracts for volatile members. volatile roughly means that if I need it for my program to work, something outside of the normal flow of execution will happen to the object. Either it will have side effects when I access it, or its value can be changed out from under me. Given those two situations, how do you envision checkable contracts to work? There is also the idea that Andrei Alexandrescu put forth in <http://drdobbs.com/cpp/184403766> to use volatile member functions for other purposes. Is that the kind of thing you envision applying contracts to? The uses I've seen of volatile on non-primitive types is almost always a programming error. Do you have practical examples where this is not the case? -- Nevin ":-)" Liber <mailto:nevin@eviloverlord.com> (847) 691-1404