CppInterOp
C++ Language Interoperability Layer
Loading...
Searching...
No Matches
Classes | Namespaces | Macros
Box.h File Reference
#include <cassert>
Include dependency graph for Box.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Cpp::Box
 
struct  Cpp::Box::ObjectOps
 Operations vtable for a K_PtrOrObj payload. More...
 

Namespaces

namespace  Cpp
 

Macros

#define CPPINTEROP_ALWAYS_INLINE   inline
 
#define CPPINTEROP_UNREACHABLE()   ((void)0)
 
#define CPP_BOX_BUILTIN_TYPES
 
#define X(type, name)   K_##name,
 
#define X(type, name)   type m_##name;
 
#define X(type, name)
 
#define X(type, name)
 

Macro Definition Documentation

◆ CPP_BOX_BUILTIN_TYPES

#define CPP_BOX_BUILTIN_TYPES
Value:
X(bool, Bool) \
X(char, Char_S) \
X(signed char, SChar) \
X(unsigned char, UChar) \
X(short, Short) \
X(unsigned short, UShort) \
X(int, Int) \
X(unsigned int, UInt) \
X(long, Long) \
X(unsigned long, ULong) \
X(long long, LongLong) \
X(unsigned long long, ULongLong) \
X(float, Float) \
X(double, Double) \
X(long double, LongDouble)
#define X(type, name)
Definition Box.h:100

Definition at line 79 of file Box.h.

◆ CPPINTEROP_ALWAYS_INLINE

#define CPPINTEROP_ALWAYS_INLINE   inline

Definition at line 55 of file Box.h.

◆ CPPINTEROP_UNREACHABLE

#define CPPINTEROP_UNREACHABLE ( )    ((void)0)

Definition at line 66 of file Box.h.

◆ X [1/4]

#define X (   type,
  name 
)    K_##name,

Definition at line 100 of file Box.h.

◆ X [2/4]

#define X (   type,
  name 
)    type m_##name;

Definition at line 100 of file Box.h.

◆ X [3/4]

#define X (   type,
  name 
)
Value:
case K_##name: \
return vis(unbox<type>());

Definition at line 100 of file Box.h.

◆ X [4/4]

#define X (   type,
  name 
)
Value:
template <> constexpr Box::Kind Box::KindOf<type>() noexcept { \
return K_##name; \
} \
template <> inline type& Box::slot<type>(Storage & s) noexcept { \
return s.m_##name; \
} \
template <> inline const type& Box::slot<type>(const Storage& s) noexcept { \
return s.m_##name; \
}

Definition at line 100 of file Box.h.