49#ifndef LIB_META_TRAIT_H
50#define LIB_META_TRAIT_H
65 template<
class X>
class shared_ptr;
66 template<
class X,
class D>
class unique_ptr;
71 template<
class X,
class B>
class P;
82 template<
class X,
class B>
class Placement;
89 using std::remove_cv_t;
90 using std::remove_pointer_t;
91 using std::remove_reference_t;
92 using std::conditional_t;
93 using std::is_reference_v;
94 using std::is_lvalue_reference_v;
95 using std::is_rvalue_reference_v;
96 using std::is_pointer;
97 using std::is_base_of;
98 using std::is_convertible;
99 using std::is_constructible;
100 using std::is_floating_point;
101 using std::is_arithmetic;
102 using std::is_unsigned;
103 using std::is_signed;
111 static constexpr bool isConst_v = std::is_const_v<remove_reference_t<T>>;
113 static constexpr bool isLRef_v = std::is_lvalue_reference_v<T>;
115 static constexpr bool isRRef_v = std::is_rvalue_reference_v<T>;
117 static constexpr bool isRef_v = std::is_reference_v<T>;
137 return const_cast<X&
> (x);
158 return const_cast<Type&
> (*ptr);
188 template<
typename X,
class D>
216 template<
typename X,
class B>
274 template<
typename TY>
282 template<
typename TY>
290 template<
typename TY>
298 template<
typename TY>
315 template<
typename T,
typename U>
317 : is_same <typename Strip<T>::TypeReferred
318 ,typename Strip<U>::TypeReferred>
322 template<
typename S,
typename I>
324 : __or_< __and_< is_class<I>
333 template<
typename S,
typename I>
336 ,typename Strip<I>::TypeReferred>
340 template<
typename S,
typename G>
342 : std::is_convertible<typename RefTraits<S>::Reference
343 ,typename RefTraits<G>::Reference
350 : __or_< is_basically<X, std::string>
351 , is_basically<X, std::string_view>
352 , is_convertible<X, const char*>
374 : __or_< is_arithmetic<X>
381 : __and_<can_lexical2string<X>
382 ,__not_<can_convertToString<X>>
389 : is_same<X, std::basic_filebuf<char, std::char_traits<char> > >
395 : __and_<is_class<typename Strip<X>::TypePlain>
396 ,__not_<is_pointer<X>>
397 ,__not_<can_lexical2string<X>>
398 ,__not_<is_StreamSource<X>>
414 template <
typename T,
typename D>
424 template<
typename NUM>
426 : __and_<is_arithmetic<NUM>
427 ,__not_<is_floating_point<NUM>>
447 template<
typename SRC,
typename TAR>
449 : __or_<__and_<is_unsigned<SRC>, is_signed<TAR>>
450 ,__and_<is_signed<SRC>, is_unsigned<TAR>>
451 ,__and_<is_nonFloat<SRC>, is_floating_point<TAR>>
452 ,__and_<is_floating_point<SRC>, is_nonFloat<TAR>>
453 ,__not_<is_constructible<TAR, SRC>>
457 template<
typename TAR>
459 : __or_<is_arithmetic<TAR>
460 ,is_floating_point<TAR>
464#define TRAIT_IS_NARROWING(_SRC_, _TAR_) \
466 struct is_narrowingInit<_SRC_, _TAR_> \
494#undef TRAIT_IS_NARROWING
519 enum{
value = std::is_constructible<bool, Type>::value
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Hash implementation based on a lumiera unique object id (LUID) When invoking the default ctor,...
Duration is the internal Lumiera time metric.
basic constant internal time value.
A refcounting Handle to an MObject of type MO, used to constrain or explicitly specify the location w...
Metaprogramming helpers to check for specific properties of a type in question.
unsigned short int ushort
Implementation namespace for support and library code.
Steam-Layer implementation namespace root.
Primary class template for std::hash.
#define TRAIT_IS_NARROWING(_SRC_, _TAR_)