1 #ifndef GEOS_COMMON_STD_CONTAINER_WRAPPERS_HPP
2 #define GEOS_COMMON_STD_CONTAINER_WRAPPERS_HPP
6 #include <unordered_map>
24 typename Allocator = std::allocator< T >,
25 bool USE_STD_CONTAINER_BOUNDS_CHECKING =
false
27 class StdVectorWrapper :
public std::vector< T, Allocator >
31 using Base = std::vector< T, Allocator >;
39 T
const & operator[](
size_t const index )
const
41 if constexpr (USE_STD_CONTAINER_BOUNDS_CHECKING)
43 return Base::at( index );
47 return Base::operator[]( index );
57 T & operator[](
size_t const index )
59 if constexpr (USE_STD_CONTAINER_BOUNDS_CHECKING)
61 return Base::at( index );
65 return Base::operator[]( index );
71 #if defined( GEOS_USE_BOUNDS_CHECK )
77 template<
typename T,
typename Allocator = std::allocator< T > >
78 using stdVector = internal::StdVectorWrapper< T, Allocator, true >;
85 template<
typename T,
typename Allocator = std::allocator< T > >
std::vector< T, Allocator > stdVector