///////////////////////////////////////////////////////////////////////////////
-// Name: dlist.h
+// Name: wx/dlist.h
// Purpose: wxDList<T> which is a template version of wxList
// Author: Robert Roebling
// Created: 18.09.2008
#include "wx/defs.h"
#include "wx/utils.h"
-#if wxUSE_STL
+#if wxUSE_STD_CONTAINERS
#include "wx/beforestd.h"
#include <algorithm>
}
};
-#else // STL
+#else // !wxUSE_STD_CONTAINERS
template <typename T>
class wxDList
for(size_type i = 0; i < n; ++i)
Append(v);
}
- iterator insert(const iterator& it, const_reference v = value_type())
+ iterator insert(const iterator& it, const_reference v)
{
- Insert(it.m_node,v);
+ if (it == end())
+ Append( v );
+ else
+ Insert(it.m_node,v);
iterator itprev(it);
return itprev--;
}
- void insert(const iterator& it, size_type n, const_reference v = value_type())
+ void insert(const iterator& it, size_type n, const_reference v)
{
for(size_type i = 0; i < n; ++i)
Insert(it.m_node, v);
} */
};
-#endif // wxUSE_STL/!wxUSE_STL
+#endif // wxUSE_STD_CONTAINERS/!wxUSE_STD_CONTAINERS
#endif // _WX_DLIST_H_