MDL SDK API nvidia_logo_transpbg.gif Up
assert.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2024 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
8
9#ifndef MI_NEURAYLIB_ASSERT_H
10#define MI_NEURAYLIB_ASSERT_H
11
12#include <mi/base/config.h>
13#include <mi/base/assert.h>
14
15namespace mi {
16
17namespace neuraylib {
18
19// --------------------------------------------------------------------
20//
21// Assertions
22//
23// --------------------------------------------------------------------
47#if defined( mi_neuray_assert) && ! defined( mi_neuray_assert_msg) \
48 || ! defined( mi_neuray_assert) && defined( mi_neuray_assert_msg)
49error "Only one of mi_neuray_assert and mi_neuray_assert_msg has been defined. Please define both."
50#else
51#ifndef mi_neuray_assert
52
66
67#define mi_neuray_assert(expr) mi_base_assert(expr)
68
87#define mi_neuray_assert_msg(expr, msg) mi_base_assert_msg(expr, msg)
88
89#endif // mi_neuray_assert
90#endif // mi_neuray_assert xor mi_neuray_assert_msg
91
92 // end group mi_neuray_assert
94
95} // namespace neuraylib
96} // namespace mi
97
98
99#endif // MI_NEURAYLIB_ASSERT_H
Assertions and compile-time assertions.
Configuration of the Base API.
std::basic_ostream<C, T> & error(std::basic_ostream<C, T> &ostream)
Manipulator for mi::base::Log_stream.
Definition: ilogger.h:542
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: example_derivatives.dox:5