11 #define NAMESPACE_SPH_BEGIN namespace Sph {
12 #define NAMESPACE_SPH_END }
31 #define INLINE __attribute__((always_inline)) inline
32 #define INL __attribute__((always_inline))
35 #define NO_INLINE __attribute__((noinline))
42 #define MARK_USED(x) (void)sizeof(x)
44 #define SPH_FALLTHROUGH [[fallthrough]];
46 #define DEPRECATED __attribute__((deprecated))
49 #define SPH_LIKELY(x) __builtin_expect(bool(x), 1)
50 #define SPH_UNLIKELY(x) __builtin_expect(bool(x), 0)
81 void*
operator new(std::size_t) =
delete;
82 void*
operator new[](std::size_t) =
delete;
83 void operator delete(
void*) =
delete;
84 void operator delete[](
void*) =
delete;
102 template <std::
size_t N1, std::
size_t N2>
104 template <
typename TVisitor>
106 visitor.template visit<N1>();
110 template <std::
size_t N>
112 template <
typename TVisitor>
114 visitor.template visit<N>();
122 template <std::
size_t N1, std::
size_t N2,
typename TVisitor>
129 template <
typename... TArgs>
133 template <
typename TVisitor,
typename... TArgs>
140 template <std::
size_t I, std::
size_t N>
142 template <
typename TValue,
typename... TOthers>
147 template <std::
size_t N>
149 template <
typename TValue,
typename... TOthers>
151 return std::forward<TValue>(value);
158 template <std::size_t
N,
typename TValue,
typename... TOthers>
#define INLINE
Macros for conditional compilation based on selected compiler.
INLINE void staticFor(TVisitor &&visitor)
#define NAMESPACE_SPH_BEGIN
INLINE void staticForEach(TVisitor &&visitor, TArgs &&... args)
#define NAMESPACE_SPH_END
decltype(auto) INLINE selectNth(TValue &&value, TOthers &&... others)
Helper class used to allow calling a function only from within T.
Object intended to only be constructed on stack.
void expandPack(TArgs &&...)
static decltype(auto) INLINE action(TValue &&UNUSED(value), TOthers &&... others)
static INLINE void action(TVisitor &&visitor)
static INLINE void action(TVisitor &&visitor)
Object with deleted copy and move constructor and copy and move operator.
Immovable & operator=(Immovable &&)=delete
Immovable(Immovable &&)=delete
Immovable(const Immovable &)=delete
Immovable & operator=(const Immovable &)=delete
Object with deleted copy constructor and copy operator.
Noncopyable & operator=(const Noncopyable &)=delete
Noncopyable(Noncopyable &&)=default
Noncopyable(const Noncopyable &)=delete
Noncopyable & operator=(Noncopyable &&)=default
Base class for all polymorphic objects.