Howard Hinnant wrote:
On Nov 25, 2005, at 9:06 PM, Gabriel Dos Reis wrote:
An error was made in putting it there in the first place. I rather
sequester that error instead of spreading through over the rest of
the interface.
I'll grant you that putting list::size in may have been an error.
size() is part of Table 65. Is this an error?
template<class C> void f( C & c )
{
c.size(); // error?
std::distance( c.begin(), c.end() ); // "proper"?
}
Note how this penalizes _all_ containers that have O(1) size() and
non-random access iterators.