barretenberg
Loading...
Searching...
No Matches
src
barretenberg
common
assert.hpp
1
#pragma once
2
#include <cassert>
3
#include <iostream>
4
#include <stdexcept>
5
#include <string>
6
7
// Compiler should optimize this out in release builds, without triggering an unused variable warning.
8
#define DONT_EVALUATE(expression) \
9
{ \
10
true ? static_cast<void>(0) : static_cast<void>((expression)); \
11
}
12
13
// NOLINTBEGIN
14
15
#if NDEBUG
16
#define ASSERT(expression) DONT_EVALUATE((expression))
17
#else
18
#define ASSERT(expression) assert((expression))
19
#endif
// NDEBUG
20
21
// NOLINTEND
Generated by
1.9.6