Topic: ostream: :operator<<(const? void *)


Author: fjh@munta.cs.mu.OZ.AU (Fergus Henderson)
Date: Sun, 22 Jan 1995 11:14:51 GMT
Raw View
kevlin@wslint.demon.co.uk (Kevlin Henney) writes:

>I guess that
>some of the logic behind disallowing const void * output was that you
>could break constness by reading the pointer straight back in again!
>But this is a pretty weak argument (there are far easier ways of casting
>away constness!), so I'm afraid I don't know what the real reason for the
>change was.

My guess is that there wasn't _any_ logic behind disallowing const void *
output.  I'd bet that it was inadvertent - the original author just
didn't think about `const void *'.  Note that in this thread, the
original poster didn't think about `volatile void *'.

--
Fergus Henderson - fjh@munta.cs.mu.oz.au
all [L] (programming_language(L), L \= "Mercury") => better("Mercury", L) ;-)