co_usb
Loading...
Searching...
No Matches
assert.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <version>
4
5#if defined(__cpp_lib_contracts)
6#define COUSB_PRECONDITION(...) pre(__VA_ARGS__)
7#else
8#define COUSB_PRECONDITION(...)
9#endif
10
11#if defined(__cpp_lib_contracts)
12#define COUSB_POSTCONDITION(...) post(__VA_ARGS__)
13#else
14#define COUSB_POSTCONDITION(...)
15#endif
16
17#if defined(__cpp_lib_contracts)
18#define COUSB_ASSERT(...) contract_assert(__VA_ARGS__)
19#else
20#include <cassert>
21#define COUSB_ASSERT(...) assert(__VA_ARGS__);
22#endif