A basic string, declared using my own custom-defined typedef:
typedef TSTRING std::basic_string<_TCHAR>;
would TSTRING::data() have O(x) exeuction time proportionality to the size
of the string, or static?
Carl Daniel [VC++ MVP] - 17 Oct 2004 21:45 GMT
> A basic string, declared using my own custom-defined typedef:
> typedef TSTRING std::basic_string<_TCHAR>;
> would TSTRING::data() have O(x) exeuction time proportionality to the
> size of the string, or static?
It's not specified in the standard whether data() has O(n) or O(1)
complexity, but AFIAK all known implementations have O(1) complexity.
-cd
Bonj - 18 Oct 2004 00:23 GMT
that's good
>> A basic string, declared using my own custom-defined typedef:
>> typedef TSTRING std::basic_string<_TCHAR>;
[quoted text clipped - 5 lines]
>
> -cd
P.J. Plauger - 18 Oct 2004 02:12 GMT
>A basic string, declared using my own custom-defined typedef:
> typedef TSTRING std::basic_string<_TCHAR>;
> would TSTRING::data() have O(x) exeuction time proportionality to the size
> of the string, or static?
Static.
P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com