
On 7/8/06, Emil Dotchevski <emildotchevski@hotmail.com> wrote:
exception_info * x = get_exception_info(e); x++; ++x;
Let's assume get_exception_info returns a reference.
How do you prevent this code:
exception_info * x = &get_exception_info(e); x++; ++x;
You don't avoid it, but when you see this code, you're doing a whole lot more to do something stupid -- that's why I'm really proposing and would feel better returning references.
Pointers are part of the C++ language, like it or not. :)
Yeah, as much as I'd like to get away from it, it's the sad reality. ;) -- Dean Michael C. Berris C/C++ Software Architect Orange and Bronze Software Labs http://3w-agility.blogspot.com/ http://cplusplus-soup.blogspot.com/ Mobile: +639287291459 Email: dean [at] orangeandbronze [dot] com