33 #ifndef __H__LIB_ALGEBRA__STL_DEBUG__
34 #define __H__LIB_ALGEBRA__STL_DEBUG__
43 template<
typename T,
class Allocator = std::allocator<T> >
47 typedef std::vector<T, Allocator>
super;
55 UG_COND_THROW(i >= super::size(),
"accessing element " << i <<
" but vector only has size " << super::size() <<
".")
68 return super::operator[](i);
70 inline typename super::const_reference
operator[] (
size_t i)
const
73 return super::operator[](i);
80 #define stdvector std::vector
Definition: stl_debug.h:45
void size_check(size_t i) const
Definition: stl_debug.h:53
stdvector(const std::vector< T, Allocator > &x)
Definition: stl_debug.h:62
stdvector(const stdvector< T, Allocator > &x)
Definition: stl_debug.h:63
stdvector(const Allocator &a=Allocator())
Definition: stl_debug.h:59
super::reference operator[](size_t i)
Definition: stl_debug.h:65
super::size_type size_type
Definition: stl_debug.h:49
std::vector< T, Allocator > super
Definition: stl_debug.h:47
stdvector(size_type n, const T &value=T(), const Allocator &a=Allocator())
Definition: stl_debug.h:60
#define UG_COND_THROW(cond, msg)
UG_COND_THROW(cond, msg) : performs a UG_THROW(msg) if cond == true.
Definition: error.h:61