DUNE
Distributed and Unified Numerics Environment
Dune Core Modules (2.7.0)
dune
common
assertandreturn.hh
1
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2
// vi: set et ts=4 sw=2 sts=2:
3
#ifndef DUNE_COMMON_ASSERTANDRETURN_HH
4
#define DUNE_COMMON_ASSERTANDRETURN_HH
5
6
#include <cassert>
7
9
17
#ifdef NDEBUG
18
#define DUNE_ASSERT_AND_RETURN(C,X) X
19
#else
20
#define DUNE_ASSERT_AND_RETURN(C,X) (!(C) ? throw [&](){assert(!#C);return 0;}() : 0), X
21
#endif
22
23
24
25
#endif
// DUNE_COMMON_ASSERTANDRETURN_HH
|
Legal Statements / Impressum
| Hosted by
TU Dresden
| generated with Hugo v0.111.3 (Jul 15, 22:36, 2024)