Permalink
Browse files

Add notice in push_back that size must be less than capacity

  • Loading branch information...
Mortal committed Oct 26, 2012
1 parent d75f748 commit 4ac0315338b61d3276a832575dd1e55320265293
Showing with 4 additions and 0 deletions.
  1. +2 −0 tpie/internal_stack.h
  2. +2 −0 tpie/internal_vector.h
View
@@ -54,6 +54,8 @@ class internal_stack: public internal_stack_vector_base<T,internal_stack<T> > {
///////////////////////////////////////////////////////////////////////////
/// \brief Add an element to the top of the stack.
+ /// If size() is equal to the capacity (set in the constructor or in
+ /// resize()), effects are undefined. resize() is not called implicitly.
///
/// \param val The element to add.
///////////////////////////////////////////////////////////////////////////
View
@@ -80,6 +80,8 @@ class internal_vector: public internal_stack_vector_base<T,internal_vector<T> >
///////////////////////////////////////////////////////////////////////////
/// \brief Add an element to the end of the vector.
+ /// If size() is equal to the capacity (set in the constructor or in
+ /// resize()), effects are undefined. resize() is not called implicitly.
///
/// Iterators are invalidated by this call.
///

0 comments on commit 4ac0315

Please sign in to comment.