
12 Apr
2004
12 Apr
'04
3:23 p.m.
On Tue, Apr 13, 2004 at 12:26:35AM +1000, Thorsten Ottosen wrote:
I think I have found a safe way to bind a temporary to a const reference and cast away the constness.
This means that a temporary can be passed (relatively) safely to an algorithm with a prototype like ... Comments are welcome.
Cute use of compile-time ambiguity to ensure that you don't try to mutate const objects. Offhand it seems like it is "safe", in the sense of lifetime-of-the-temporary issues. What's an example use-case? I don't recall ever needing/wanting this. -- -Brian McNamara (lorgon@cc.gatech.edu)