is list::size() unequivocally o(n)?
recently, i beheld mentioning std::list::size() linear complexity. according , fact doing contingent customary doesn't contend complexity be. the critique says: actually, depends stl you using. microsoft visible studio v6 implements size() {return (_size); } since gcc (at slightest versions 3.3.2 4.1.0) { relapse std::distance(begin(), end()); } the initial consistent speed, second o(n) speed so speculation vc++ throng size() consistent complexity dinkumware probably won't have altered fact given vc6. am i right there? what does feeling now gcc ? unequivocally o(n), since the developers select so?