ufe  4.2
Universal Front End is a DCC-agnostic component that will allow a DCC to browse and edit data in multiple data models
CfgUtilsMacros.h
Go to the documentation of this file.
1 #line 1 "S:/jenkins/workspace/ECP/ufe/ufe-full-python3.10-windows/ufe/gitmodules/peptide/src/config/CfgUtilsMacros.h"
2 //-
3 // =============================================================================
4 // Copyright 2019 Autodesk, Inc. All rights reserved.
5 //
6 // Use of this software is subject to the terms of the Autodesk license
7 // agreement provided at the time of installation or download, or which
8 // otherwise accompanies this software in either electronic or hard copy form.
9 // =============================================================================
10 //+
11 
14 
15 #ifndef PEPTIDE_CPPUTILS_MACROS_H
16 #define PEPTIDE_CPPUTILS_MACROS_H
17 
18 #include "CfgCompilerMacros.h"
19 
20 #include <cassert>
21 
27 #define PEPTIDE_END_MACRO static_assert(true, "")
28 
33 #define PEPTIDE_IDENTITY(X) X
34 
47 #if PEPTIDE_IS_CLANG || PEPTIDE_IS_GCC
48 
49 // NOLINT to silence up clang-tidy warning:
50 // warning: found assert() that could be replaced by static_assert() [cert-dcl03-c]
51 #define PEPTIDE_UNREACHABLE(MSG) \
52  assert(false && MSG); /* NOLINT */ \
53  __builtin_unreachable()
54 
55 #elif PEPTIDE_IS_MSC
56 
57 #define PEPTIDE_UNREACHABLE(MSG) \
58  assert(false && MSG); \
59  __assume(false)
60 
61 #else
62 #error "PEPTIDE_UNREACHABLE(): Unsupported compiler!"
63 #define PEPTIDE_UNREACHABLE(MSG) assert(false && MSG)
64 #endif
65 
66 
95 #if PEPTIDE_IS_MSC
96 #define PEPTIDE_DEPRECATED(REASON)
97 #else
98 #define PEPTIDE_DEPRECATED(REASON) [[deprecated(REASON)]]
99 #endif
100 
101 #endif
Macro definition for identifying compilers and there capabilities.