DUNE
Distributed and Unified Numerics Environment
DUNE PDELab (2.8)
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 (Aug 31, 22:30, 2024)