Lugdunum  0.1.0
Utils.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 
4 #if defined(LUG_COMPILER_MSVC)
5  #define LUG_SYSTEM_FUNCTION_NAME __FUNCSIG__
6 #else
7  #define LUG_SYSTEM_FUNCTION_NAME __PRETTY_FUNCTION__
8 #endif
9 
10 
11 #if defined(__clang__) || defined(__GNUC__)
12 
13  #define LUG_LIKELY(x) __builtin_expect(!!(x), 1)
14  #define LUG_UNLIKELY(x) __builtin_expect(!!(x), 0)
15 
16 #else
17 
18  #define LUG_LIKELY(x) (x)
19  #define LUG_UNLIKELY(x) (x)
20 
21 #endif