
From: "Jonathan Turkanis" <technews@kangaroologic.com>
"David Abrahams" <dave@boost-consulting.com> wrote in message news:u3c1jhvz5.fsf@boost-consulting.com...
"Jonathan Turkanis" <technews@kangaroologic.com> writes:
template<typename Range> typename range_const_iterator<X>::type const_begin(Range& rng) { return begin(static_cast<const Range&>(rng)); }
For one thing you can't use static_cast to change constness.
Are you sure? The expression
Yep. See 5.2.9. You'll see what static_cast can do, and then 5.2.9/3 specifically excludes any other conversions. Modifying cv qualification is not among the things static_cast can do. -- Rob Stewart stewart@sig.com Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;