[intrusive doc] slist says that both push_front and push_back are constant-time

The doc for slist says that if using non-constant size semantics, the size of the slist is the size of a single pointer. That means that either push_front or push_back cannot be constant time since we first need to find it. Am I missing something? Thanks, Andy.

AMDG Andy Venikov wrote:
The doc for slist says that if using non-constant size semantics, the size of the slist is the size of a single pointer. That means that either push_front or push_back cannot be constant time since we first need to find it.
From the documentation for push_back "This function is only available is cache_last<> is true" In Christ, Steven Watanabe

Steven Watanabe wrote:
AMDG
Andy Venikov wrote:
The doc for slist says that if using non-constant size semantics, the size of the slist is the size of a single pointer. That means that either push_front or push_back cannot be constant time since we first need to find it.
From the documentation for push_back
"This function is only available is cache_last<> is true"
Sorry, my bad. Thanks!
In Christ, Steven Watanabe
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Andy.
participants (2)
-
Andy Venikov
-
Steven Watanabe