48#include <neolib/neolib_export.hpp>
51constexpr bool ndebug =
true;
57#define STRING(x) STRING2(x)
59#define TODO_MSG __FILE__ "(" STRING(__LINE__) "): TODO"
62 _Pragma("message (TODO_MSG)") \
63 throw std::logic_error(std::string{ TODO_MSG });
66 throw std::logic_error(std::string{ TODO_MSG });
69#define rvalue_cast static_cast
71#define GENERATE_HAS_MEMBER_TYPE(Type) \
73template <class T, bool OK = std::is_class_v<T>> \
74class HasMemberType_##Type \
77 static constexpr bool RESULT = false; \
81class HasMemberType_##Type<T, true> \
84 using Yes = char[2]; \
87 struct Fallback { struct Type { }; }; \
88 struct Derived : T, Fallback { }; \
90 template < class U > \
91 static No& test ( typename U::Type* ); \
92 template < typename U > \
93 static Yes& test ( U* ); \
96 static constexpr bool RESULT = sizeof(test<Derived>(nullptr)) == sizeof(Yes); \
100struct has_member_type_##Type \
101: public std::integral_constant<bool, HasMemberType_##Type<T>::RESULT> \
110 template <
typename T>
112 template <
typename T>
118 template <
typename T,
typename... Ts>
121 template <
typename T,
typename... Ts>
124 template <
typename T,
typename Tail,
typename... Ts>
125 struct variadic_index<T, Tail, Ts...> : std::integral_constant<std::size_t, 1 + variadic_index<T, Ts...>::value> {};
127 template <
typename T,
typename... Ts>
130 template <
typename T1,
typename T2>
135 template <
typename T>
137 template <
typename T1,
typename T2>
139 template <
typename T1,
typename T2>
141 template <
typename T>
144 template <
typename T>
147 template <
typename T,
typename AT,
typename = sfinae>
149 template <
typename T,
typename AT>
151 template <
typename T,
typename AT>
154 template <
typename T,
typename AT>
157 template <
typename,
typename = sfinae>
159 template <
typename T>
161 template <
typename T>
163 template <
typename T>
165 template <
typename T>
167 template <
typename T1,
typename T2>
169 template <
typename T1,
typename T2>
173 template <
typename Rep,
typename Period>
174 struct abstract_type<
std::chrono::duration<Rep, Period>> : std::true_type {
typedef std::chrono::duration<Rep, Period>
type; };
177 template <
typename T>
180 template <typename T, typename = std::enable_if_t<detail::abstract_type<T>::value,
sfinae>>
186 template <typename T, typename = std::enable_if_t<detail::abstract_type<T>::value, sfinae>>
192 template <
typename T1,
typename T2>
198 template <
typename T1,
typename T2>
206 template <
typename T,
typename = sfinae>
208 template <
typename T>
212 template <
typename T>
215 template <
typename T>
220 template <
typename T>
227#ifdef NEOLIB_HOSTED_ENVIRONMENT
231#ifndef USE_AVX_DYNAMIC
234#ifndef USE_EMM_DYNAMIC
240#define BOOST_BIND_GLOBAL_PLACEHOLDERS
241#define _SILENCE_CXX17_ALLOCATOR_VOID_DEPRECATION_WARNING
249#include <boost/dll.hpp>
250#define API extern "C" BOOST_SYMBOL_EXPORT
typename correct_const< T, AT >::type correct_const_t
constexpr bool abstract_class_possible_v
typename detail::abstract_type< T >::type abstract_t
typename detail::abstract_return_type< T >::type abstract_return_t
const abstract_t< T > & to_abstract(const T &aArgument)
constexpr std::size_t index_of_v
to_const_reference_t< T > to_const(T &&object)
void clear_cache(cache< T > &aCachedVariable)
const std::remove_reference_t< T > & to_const_reference_t
#define GENERATE_HAS_MEMBER_TYPE(Type)
std::remove_const_t< T > type
correct_const_t< T, typename T::abstract_type > type
correct_const_t< T, T > type
correct_const_t< T, T > type
correct_const_t< T, T > type
abstract_type< constpair< T1, T2 > >::type type
std::chrono::duration< Rep, Period > type
abstract_type< pair< T1, T2 > >::type type
static constexpr bool value