I love const_cast and it loves me back. (It's hard to go wrong adding const to things as long as you're confident that it's okay for them to be immutable. These totally are.)
Whoops, you've just exposed some sloppy thinking on my part. I should have said "reference to const pointer to const int", following the what-comes-before-it rule -- there's a const after the *, and the other one precedes the int but there's nothing before that, so it applies to the int.
For some reason, in my head that parses as "const reference". I suspect g++ error messages have something to do with it.
(no subject)
Date: 2009-05-16 01:20 pm (UTC)For some reason, in my head that parses as "const reference". I suspect g++ error messages have something to do with it.
Thanks for the catch!
(no subject)
Date: 2009-05-16 02:24 pm (UTC)