Line data Source code
1 1 : // Distributed under the MIT License.
2 : // See LICENSE.txt for details.
3 :
4 : /// \file
5 : /// Defines macro DEBUG_STATIC_ASSERT.
6 :
7 : #pragma once
8 :
9 : /*!
10 : * \ingroup ErrorHandlingGroup
11 : * \brief A `static_assert` that is only checked in Debug builds
12 : */
13 : #ifdef SPECTRE_DEBUG
14 : #define DEBUG_STATIC_ASSERT(...) static_assert(__VA_ARGS__)
15 : #else // ifdef SPECTRE_DEBUG
16 1 : #define DEBUG_STATIC_ASSERT(...) static_assert(true)
17 : #endif // ifdef SPECTRE_DEBUG
|