DUNE
Distributed and Unified Numerics Environment
DUNE PDELab (2.8)
dune
common
boundschecking.hh
Go to the documentation of this file.
1
#ifndef DUNE_BOUNDSCHECKING_HH
2
#define DUNE_BOUNDSCHECKING_HH
3
4
#include <
dune/common/exceptions.hh
>
5
17
#ifndef DUNE_ASSERT_BOUNDS
18
#if defined(DUNE_CHECK_BOUNDS) || defined(DOXYGEN)
19
28
#define DUNE_ASSERT_BOUNDS(cond) \
29
do { \
30
if (!(cond)) \
31
DUNE_THROW(Dune::RangeError, "Index out of bounds."
); \
32
} while (false)
33
34
#else
35
#define DUNE_ASSERT_BOUNDS(cond)
36
#endif
37
#endif
38
39
/* @} */
40
41
#endif
// DUNE_BOUNDSCHECKING_HH
exceptions.hh
A few common exception classes.
|
Legal Statements / Impressum
| Hosted by
TU Dresden
| generated with Hugo v0.111.3 (Dec 21, 23:30, 2024)