diff options
Diffstat (limited to 'Carpet/Requirements/src/util.hh')
-rw-r--r-- | Carpet/Requirements/src/util.hh | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/Carpet/Requirements/src/util.hh b/Carpet/Requirements/src/util.hh index 73b5faa1e..0ed99cda6 100644 --- a/Carpet/Requirements/src/util.hh +++ b/Carpet/Requirements/src/util.hh @@ -4,9 +4,24 @@ #include <iostream> #include <vector> + + +// Use this macro AT instead of vector's operator[] or at(). Depending +// on the macro NDEBUG, this macro AT either checks for valid indices +// or not. +#ifndef AT +# ifndef NDEBUG +# define AT(index) at(index) +# else +# define AT(index) operator[](index) +# endif +#endif + + + namespace Requirements { -using namespace std; + using namespace std; // taken from defs.cc and defs.hh // Vector output |