Steven Schveighoffer <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #2 from Steven Schveighoffer <>  2009-05-19 
07:01:51 PDT ---
Consider this actually sensical case:

struct S
  int *a;

S foo() {...}

*foo.a = 3;

Clearly, you don't want structs to be non-modifyiable in all cases.  If S has
member functions which modify both values of S and values S references, then
you should able to call those functions also.  It might be very difficult for
the compiler to distinguish all these cases.

I'd say the case you give is non-sensical, but still valid code.

This is also non-sensical code, in the same light, and I don't think it should
be a compiler error:

void foo()
   int x;

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to