dune-common 3.0-git
boundschecking.hh
Go to the documentation of this file.
1#ifndef DUNE_BOUNDSCHECKING_HH
2#define DUNE_BOUNDSCHECKING_HH
3
5
6#ifndef DUNE_ASSERT_BOUNDS
7#ifdef DUNE_CHECK_BOUNDS
8#define DUNE_ASSERT_BOUNDS(cond) \
9 do { \
10 if (!(cond)) \
11 DUNE_THROW(Dune::RangeError, "Index out of bounds."); \
12 } while (false)
13#else
20#define DUNE_ASSERT_BOUNDS(cond)
21#endif
22#endif
23
24#endif
A few common exception classes.