<p>Is std::string size() a O(1) operation?</p>

<p>The implementation of STL I'm using is the one built into VC++</p>

```
```
size_type __CLR_OR_THIS_CALL size() const

{   // return length of sequence

    return (_Mysize);

}
```
```
So it eventually might be like this, but you can never be sure.