L
LaBird
Dear all,
I'd like to know if there is any function or program call
in C++ (without memory protection support by OS),
that can determine whether an object is being read or
written? e.g.,
a = b + c; // a is being written while b and c are being read
a++; // a is being read and written
Also, is there any code that can determine the object
is a lvalue or rvalue?
I think it is possible if a, b and c are user-defined types
(as we can overload operator =, + and ++, and so on),
but how about primitive types?
Thanks in advance.
Regards,
LaBird (Benny).
I'd like to know if there is any function or program call
in C++ (without memory protection support by OS),
that can determine whether an object is being read or
written? e.g.,
a = b + c; // a is being written while b and c are being read
a++; // a is being read and written
Also, is there any code that can determine the object
is a lvalue or rvalue?
I think it is possible if a, b and c are user-defined types
(as we can overload operator =, + and ++, and so on),
but how about primitive types?
Thanks in advance.
Regards,
LaBird (Benny).