Empirical
|
A drop-in wrapper for std::array; adds on bounds checking in debug mode. More...
Go to the source code of this file.
Classes | |
class | emp::array< T, N > |
struct | emp::array< T, N >::iterator_wrapper< ITERATOR_T > |
Setup an iterator wrapper to make sure that they're valid. More... | |
struct | emp::TypeID< emp::array< T, N > > |
Ensure that emp::array works with TypeID. More... | |
Namespaces | |
emp | |
If we are in emscripten, make sure to include the header. | |
Functions | |
template<typename T , size_t N> | |
std::ostream & | operator<< (std::ostream &out, const emp::array< T, N > &v) |
template<typename T , size_t N> | |
std::istream & | operator>> (std::istream &is, emp::array< T, N > &v) |
A drop-in wrapper for std::array; adds on bounds checking in debug mode.
If EMP_NDEBUG is set, emp::array is just an alias for std::array. Otherwise, every time an array is accessed, tests are done to make sure that the access is legal.
Add tests in array::front and array::back to ensure not empty.
Add tests for get.
std::ostream& operator<< | ( | std::ostream & | out, |
const emp::array< T, N > & | v | ||
) |
std::istream& operator>> | ( | std::istream & | is, |
emp::array< T, N > & | v | ||
) |