libxcoder  5.2.0
ni_macro_check.cpp
Go to the documentation of this file.
1 #include "ni_defs.h"
2 #include "ni_macro_defs_quadra.h"
3 
4 #define STR_HELPER(x) #x
5 #define STR(x) STR_HELPER(x)
6 
7 static constexpr bool is_string_equal(const char *l, const char *r)
8 {
9  return (*l == *r) && (!*l || is_string_equal(l + 1, r + 1));
10 }
11 
12 #define CHECK_STRING_EQUAL(A, B) \
13 static_assert(is_string_equal((A), (B)), #A"=""'" A "'" " and " #B"=""'" B "'" " are not equal")
14 
15 #define CHECK_NUMBER_EQUAL(A, B) \
16 static_assert((A) == (B), #A"=" STR(A) " and " #B"=" STR(B) " are not equal")
17 
LIBXCODER_API_VERSION_MAJOR
#define LIBXCODER_API_VERSION_MAJOR
Definition: ni_defs.h:110
LIBXCODER_API_VERSION_MINOR
#define LIBXCODER_API_VERSION_MINOR
Definition: ni_defs.h:111
NI_XCODER_REVISION
#define NI_XCODER_REVISION
Definition: ni_defs.h:95
ni_defs.h
Common NETINT definitions used by all modules.
CHECK_STRING_EQUAL
#define CHECK_STRING_EQUAL(A, B)
Definition: ni_macro_check.cpp:12
LIBXCODER_QUADRA_API_VERSION_MAJOR
#define LIBXCODER_QUADRA_API_VERSION_MAJOR
Definition: ni_macro_defs_quadra.h:6
ni_macro_defs_quadra.h
LIBXCODER_QUADRA_API_VERSION_MINOR
#define LIBXCODER_QUADRA_API_VERSION_MINOR
Definition: ni_macro_defs_quadra.h:7
CHECK_NUMBER_EQUAL
#define CHECK_NUMBER_EQUAL(A, B)
Definition: ni_macro_check.cpp:15
NI_QUADRA_XCODER_REVISION
#define NI_QUADRA_XCODER_REVISION
Definition: ni_macro_defs_quadra.h:3