give me a const iterator
(boost.devel 2004/09/15~)

In the pre-redmond mailing Walter Brown discusses the possibility of adding these members to standard container classes:

const_iterator cbegin();
const_iterator cend();
const_reverse_iterator crbegin();
const_reverse_iterator crbegin();

The motiviation is that we want to be able to say explicitly "give me a const iterator" without doing ugly casts.

('A`)マジで?ってゆーか,なんで"doing ugly casts"?文脈追えてねー.
↓"doing ugly casts"の例(キャストじゃないけれど)

std::vector<int> v;
// .....
std::vector<int>::const_iterator ci;
// .....
std::size_t d = std::distance<std::vector<int>::const_iterator>(v.begin(), ci); // うにゃ〜!!
//std::size_t d = std::distance(v.cbegin(), ci); // cbeginがあるとこう書ける