TDE 0.1.0
 
Loading...
Searching...
No Matches
common.hpp File Reference

Some utility macros. More...

#include <memory>

Go to the source code of this file.

Macros

#define _TDE_FORWARD(x)   x
 
#define _TDE_CONCAT(a, b)   a##b
 
#define _TDE_STR_IMPL(x)   #x
 
#define _TDE_STR(x)   _TDE_STR_IMPL(x)
 
#define TDE_PUBLIC
 
#define TDE_INLINE   inline __attribute__((always_inline))
 
#define TDE_CXX_VERSION   "unknown"
 
#define _tde_defer_impl(expr, cb_name, ph_name, line)
 
#define tde_defer(expr)    _tde_defer_impl(expr, _tde_defer_cb_, _tde_defer_ph_, __LINE__)
 

Detailed Description

Some utility macros.

Author
Dessera (desse.nosp@m.ra@q.nosp@m.q.com)
Version
0.1.0
Date
2025-06-02

Macro Definition Documentation

◆ _tde_defer_impl

#define _tde_defer_impl (   expr,
  cb_name,
  ph_name,
  line 
)
Value:
auto _TDE_CONCAT(cb_name, line) = [&](int*) { expr; }; \
std::unique_ptr<int, decltype(_TDE_CONCAT(cb_name, line))> _TDE_CONCAT( \
ph_name, line) \
{ \
nullptr, _TDE_CONCAT(cb_name, line) \
}