Von: "Jonathan Wakely"
> What exactly are you suggesting for the semantics of the warning?
Good question. It is difficult to detect all suspiscious cases, but at least
some of the can be defined:
If we have a function prototype
f(...,Ti xi,...Tj xj,...)
and call the function f(... xi, ..
const
> or is there some mutable argument?)
> and it might be possible to add a warning "shared mutable data".
>
> How difficult is it to implement such a warning?
>
What exactly are you suggesting for the semantics of the warning? You
haven't described what you want it
forbids such code.
From my understanding, however, sharing of mutable data can be detected by the
compiler on caller side
(looking at the prototype of the function - are all shared arguments const or
is there some mutable argument?)
and it might be possible to add a warning "shared mutable data&q