Gorgon Game Engine
TMP.h
Go to the documentation of this file.
1 
4 #pragma once
5 
6 #include <tuple>
7 #include <typeinfo>
8 #include "Utils/Compiler.h"
9 #include <functional>
10 
11 namespace Gorgon {
12  namespace TMP {
13 
15  template<int ...> struct Sequence {};
16 
18  template<int N, int ...S> struct Generate : Generate<N-1, N-1, S...> {};
19 
21  template<int ...S> struct Generate<0, S...>{ typedef Sequence<S...> Type; };
22 
23  template<class F_>
24  struct FunctionTraits;
25 
26  template<class R_, class... Args_>
27  struct FunctionTraits<R_(*)(Args_...)> : public FunctionTraits<R_(Args_...)>
28  {};
29 
31 
32 
33  constexpr bool static_strequal_helper(const char * a, const char * b, unsigned len) {
34  return (len == 0) ? true : ((*a == *b) ? static_strequal_helper(a + 1, b + 1, len - 1) : false);
35  }
36 
37  template <unsigned N1_, unsigned N2_>
38  constexpr bool StaticStrEqual(const char (&str1)[N1_], const char (&str2)[N2_]) {
39  return (N1_ == N2_) ? static_strequal_helper(&(str1[0]), &(str2[0]), N1_) : false;
40  }
41 
59  template<class R_, class ...Args_>
60  struct FunctionTraits<R_(Args_...)> {
62  using ReturnType = R_;
63 
65  static const unsigned Arity = sizeof...(Args_);
66 
68  static const bool IsMember = false;
69 
72  template<unsigned N>
73  struct Arguments {
74  static_assert(N<sizeof...(Args_), "Argument index out of bounds");
75 
77  using Type = typename std::tuple_element<N, std::tuple<Args_...>>::type;
78  };
79  };
80 
82  template<class C_, class R_, class ...Args_>
83  struct FunctionTraits<R_(C_::*)(Args_...)> :
84  public FunctionTraits<R_(typename std::decay<C_>::type&, Args_...)>
85  {
86  static const bool IsMember = true;
87  };
88 
89  template<class C_, class R_, class ...Args_>
90  struct FunctionTraits<R_(C_::*)(Args_...) const> :
91  public FunctionTraits<R_(const typename std::decay<C_>::type&, Args_...)>
92  {
93  static const bool IsMember = true;
94  };
95 
96  template<class F_>
97  struct FunctionTraits
98  {
99  private:
100  using innertype = FunctionTraits<decltype(&F_::operator())>;
101  public:
102  using ReturnType = typename innertype::ReturnType;
103 
104  static const unsigned Arity = innertype::Arity - 1;
105 
106  static const bool IsMember = false;
107 
108  template <unsigned N>
109  struct Arguments
110  {
111  static_assert(N<Arity, "Argument index out of bounds");
112  using Type = typename innertype::template Arguments<N+1>::Type;
113  };
114  };
115 
116  template<class F_>
117  struct FunctionTraits<F_&> : public FunctionTraits<F_>
118  {};
119 
120  template<class F_>
121  struct FunctionTraits<F_&&> : public FunctionTraits<F_>
122  {};
123 
125 
127  template<bool Cond_, class T1_, class T2_>
128  struct Choose;
129 
131  template<class T1_, class T2_>
132  struct Choose<false, T1_, T2_> {
133  using Type = T2_;
134  };
135 
136  template<class T1_, class T2_>
137  struct Choose<true, T1_, T2_> {
138  using Type = T1_;
139  };
141 
143  class RTTI {
144  public:
146  virtual bool IsPointer() const = 0;
147 
149  virtual bool IsReference() const = 0;
150 
152  virtual bool IsConstant() const = 0;
153 
155  virtual bool IsSameType(const std::type_info &) const = 0;
156 
158  template<class T_>
159  bool IsSameType() const {
160  return IsSameType(typeid(T_));
161  }
162 
163  bool operator ==(const std::type_info &info) const {
164  return IsSameType(info);
165  }
166 
167  bool operator !=(const std::type_info &info) const {
168  return IsSameType(info);
169  }
170 
171  operator const std::type_info &() const {
172  return TypeInfo();
173  }
174 
176  virtual long GetSize() const = 0;
177 
180  virtual const std::type_info &TypeInfo() const = 0;
182 
184  std::string Name() const { return Utils::GetTypeName(TypeInfo()); }
185  };
186 
190  class RTTS : public RTTI {
191  public:
193  virtual RTTS *Duplicate() const = 0;
194 
196  virtual void *Clone(const void* const obj) const = 0;
197 
199  virtual void Clone(void* const dest, const void* const obj) const = 0;
200 
202  virtual void Delete(void* obj) const = 0;
203 
205  virtual ~RTTS() { }
206  };
207 
209  template<class T_>
210  class RTT : public RTTS {
211  using StorageType = typename Choose<std::is_reference<T_>::value, typename std::remove_reference<T_>::type*, T_>::Type*;
212  using NewType = typename std::remove_const<typename Choose<std::is_reference<T_>::value, typename std::remove_reference<T_>::type*, T_>::Type>::type;
213  using CloneType = const typename Choose<std::is_reference<T_>::value, typename std::remove_reference<T_>::type*, T_>::Type* const;
214 
215  virtual RTTS *Duplicate() const override {
216  return new RTT<T_>();
217  }
218 
219 
220  virtual void *Clone(const void* const obj) const override {
221  auto n = new NewType(*reinterpret_cast<CloneType>(obj));
222 
223  return n;
224  }
225 
226  virtual void Clone(void* const dest, const void* const obj) const override {
227  *reinterpret_cast<StorageType>(dest) = *reinterpret_cast<CloneType>(obj);
228  }
229 
230 
231  virtual void Delete(void *obj) const override {
232  delete static_cast<StorageType>(obj);
233  }
234 
235  virtual bool IsSameType(const std::type_info &info) const override {
236  return info==typeid(T_);
237  }
238 
239  virtual const std::type_info &TypeInfo() const override {
240  return typeid(T_);
241  }
242 
243  virtual long GetSize() const override { return sizeof(T_); }
244 
245  virtual bool IsPointer() const override { return std::is_pointer<T_>::value; }
246 
247  virtual bool IsReference() const override { return std::is_reference<T_>::value; }
248 
249  virtual bool IsConstant() const override { return std::is_const<T_>::value; }
250  };
251 
252  template<class T_>
253  typename std::enable_if<std::is_copy_constructible<T_>::value && !std::is_abstract<T_>::value, void*>::type
254  clonetype_wnull(const void* const obj) {
255  using NewType = typename std::remove_const<typename Choose<std::is_reference<T_>::value, typename std::remove_reference<T_>::type*, T_>::Type>::type;
256  using CloneType = const typename Choose<std::is_reference<T_>::value, typename std::remove_reference<T_>::type*, T_>::Type* const;
257 
258  auto n = new NewType(*reinterpret_cast<CloneType>(obj));
259 
260  return n;
261  }
262  template<class T_>
263  typename std::enable_if<!std::is_copy_constructible<T_>::value || std::is_abstract<T_>::value, void*>::type clonetype_wnull(const void* const obj) {
264  return nullptr;
265  }
266 
267  template<class T_>
268  typename std::enable_if<std::is_copy_assignable<T_>::value && !std::is_const<T_>::value, void>::type
269  copytype_wnull(void* const dest, const void* const obj) {
270  using NewType = typename std::remove_const<typename Choose<std::is_reference<T_>::value, typename std::remove_reference<T_>::type*, T_>::Type>::type;
271  using CloneType = const typename Choose<std::is_reference<T_>::value, typename std::remove_reference<T_>::type*, T_>::Type* const;
272  using StorageType = typename Choose<std::is_reference<T_>::value, typename std::remove_reference<T_>::type*, T_>::Type*;
273 
274  *reinterpret_cast<StorageType>(dest) = *reinterpret_cast<CloneType>(obj);
275  }
276  template<class T_>
277  typename std::enable_if<!std::is_copy_assignable<T_>::value || std::is_const<T_>::value, void>::type copytype_wnull(void* const dest, const void* const obj) {
278 
279  }
280 
282  template<class T_>
283  class AbstractRTT : public RTTS {
284  using StorageType = typename Choose<std::is_reference<T_>::value, typename std::remove_reference<T_>::type*, T_>::Type*;
285  using NewType = typename std::remove_const<typename Choose<std::is_reference<T_>::value, typename std::remove_reference<T_>::type*, T_>::Type>::type;
286  using CloneType = const typename Choose<std::is_reference<T_>::value, typename std::remove_reference<T_>::type*, T_>::Type* const;
287 
288  virtual RTTS *Duplicate() const {
289  return new AbstractRTT<T_>();
290  }
291 
292  virtual void* Clone(const void* const obj) const override {
293  return clonetype_wnull<T_>(obj);
294  }
295 
296  virtual void Clone(void* const dest, const void* const obj) const override {
297  copytype_wnull<T_>(dest, obj);
298  }
299 
300  virtual void Delete(void *obj) const override {
301  delete static_cast<StorageType>(obj);
302  }
303 
304  virtual bool IsSameType(const std::type_info &info) const override {
305  return info==typeid(T_);
306  }
307 
308  virtual const std::type_info &TypeInfo() const override {
309  return typeid(T_);
310  }
311 
312  virtual long GetSize() const override { return sizeof(T_); }
313 
314  virtual bool IsPointer() const override { return std::is_pointer<T_>::value; }
315 
316  virtual bool IsReference() const override { return std::is_reference<T_>::value; }
317 
318  virtual bool IsConstant() const override { return std::is_const<T_>::value; }
319  };
320 
322  template<>
323  class AbstractRTT<void> : public RTTS {
324 
325  virtual RTTS *Duplicate() const {
326  return new AbstractRTT<void>();
327  }
328 
329  virtual void *Create() const {
330  return nullptr;
331  }
332 
333  virtual void *Clone(const void* const obj) const override {
334  return nullptr;
335  }
336 
337  virtual void Clone(void* const dest, const void* const obj) const override {
338 
339  }
340 
341  virtual void Delete(void *obj) const override {
342  throw std::runtime_error("type is void");
343  }
344 
345  virtual bool IsSameType(const std::type_info &info) const override {
346  return info==typeid(void);
347  }
348 
349  virtual const std::type_info &TypeInfo() const override {
350  return typeid(void);
351  }
352 
353  virtual long GetSize() const override { return 0; }
354 
355  virtual bool IsPointer() const override { return std::is_pointer<void>::value; }
356 
357  virtual bool IsReference() const override { return std::is_reference<void>::value; }
358 
359  virtual bool IsConstant() const override { return std::is_const<void>::value; }
360  };
361 
362 
364  class RTTH {
365  public:
366  virtual ~RTTH() {
367  delete &NormalType;
368  delete &ConstType;
369  delete &RefType;
370  delete &ConstRefType;
371  delete &PtrType;
372  delete &ConstPtrType;
373  }
374 
376 
377  protected:
378  RTTH(RTTS &normaltype, RTTS &consttype, RTTS &reftype, RTTS &constreftype, RTTS &ptrtype, RTTS &constptrtype) :
379  NormalType(normaltype), ConstType(consttype), RefType(reftype), ConstRefType(constreftype),
380  PtrType(ptrtype), ConstPtrType(constptrtype)
381  { }
382  };
383 
385  template<class T_>
386  class RTTC : public RTTH {
387  public:
388  using BaseType = typename std::remove_const<typename std::remove_reference<T_>::type>::type;
389 
390  RTTC() :
391  RTTH(
392  *new RTT<BaseType >(), *new RTT<const BaseType >(),
393  *new RTT<BaseType&>(), *new RTT<const BaseType&>(),
394  *new RTT<BaseType*>(), *new RTT<const BaseType*>()
395  )
396  { }
397  };
398 
400  template<class T_>
401  class AbstractRTTC : public RTTH {
402  public:
403  using BaseType = typename std::remove_const<typename std::remove_reference<T_>::type>::type;
404 
406  RTTH(
407  *new AbstractRTT<BaseType >(), *new AbstractRTT<const BaseType >(),
408  *new AbstractRTT<BaseType&>(), *new AbstractRTT<const BaseType&>(),
409  *new RTT<BaseType*>(), *new RTT<const BaseType*>()
410  )
411  { }
412  };
413 
414  template<class T_>
416  using Type = T_;
417  };
418 
419  template<class T_>
420  struct RemoveRValueReference<T_&&> {
421  using Type = T_;
422  };
423 
424  template<typename T>
426  {
427  using one = char;
428  struct two {
429  char dummy[2];
430  };
431 
432  template<class TT>
433  static one test(decltype(((std::ostream*)nullptr)->operator<<((TT*)nullptr))) { return one(); }
434 
435  static two test(...) { return two(); }
436 
437  public:
438  static const bool Value = sizeof( test(*(std::ostream*)nullptr) )==1;
439  };
440 
442 
443  template<int n> struct Placeholder {};
444  template<> struct Placeholder<1> { static decltype(std::placeholders::_1) value() { return std::placeholders::_1; } };
445  template<> struct Placeholder<2> { static decltype(std::placeholders::_2) value() { return std::placeholders::_2; } };
446  template<> struct Placeholder<3> { static decltype(std::placeholders::_3) value() { return std::placeholders::_3; } };
447  template<> struct Placeholder<4> { static decltype(std::placeholders::_4) value() { return std::placeholders::_4; } };
448  template<> struct Placeholder<5> { static decltype(std::placeholders::_5) value() { return std::placeholders::_5; } };
449  template<> struct Placeholder<6> { static decltype(std::placeholders::_6) value() { return std::placeholders::_6; } };
450  template<> struct Placeholder<7> { static decltype(std::placeholders::_7) value() { return std::placeholders::_7; } };
451  template<> struct Placeholder<8> { static decltype(std::placeholders::_8) value() { return std::placeholders::_8; } };
452  template<> struct Placeholder<9> { static decltype(std::placeholders::_9) value() { return std::placeholders::_9; } };
453 
454  template<int...> struct IntTuple {};
455 
456  // make indexes impl is a helper for make indexes
457  template<int I, typename IntTuple, typename... Types>
459 
460  template<int I, int... Indices, typename T, typename... Types>
461  struct MakeIndices_impl<I, IntTuple<Indices...>, T, Types...> {
462  typedef typename MakeIndices_impl<I+1,
463  IntTuple<Indices..., I>,
464  Types...>::type type;
465  };
466 
467  template<int I, int... Indices>
468  struct MakeIndices_impl<I, IntTuple<Indices...> > {
469  typedef IntTuple<Indices...> type;
470  };
471 
472  template<typename... Types>
473  struct MakeIndices : MakeIndices_impl<0, IntTuple<>, Types...> {};
474 
475  template< class T, class Ret_, class... Args, int... Indices >
476  std::function< Ret_(Args...) > MakeFunctionFromMember_helper(Ret_ (T::* pm) (Args...),
477  T * that, IntTuple< Indices... >) {
478  return std::bind(pm, that, Placeholder<Indices+1>::value()...);
479  }
480 
481  template< class T_, class Ret_, class... Args >
482  std::function< Ret_(Args...) > MakeFunctionFromMember(Ret_ (T_::* pm) (Args...), T_ *that) {
483  return MakeFunctionFromMember_helper(pm, that, typename MakeIndices<Args...>::type());
484  }
485 
486  template <typename U>
488  typedef char yes;
489  struct no { char _[2]; };
490  template<typename T, typename L=decltype(&T::operator())>
491  static yes impl(T*) { return yes(); }
492  static no impl(...) { return no(); }
493 
494  enum { value = sizeof(impl(static_cast<U*>(0))) == sizeof(yes) };
495  };
496 
497 
498  }
499 };
Gorgon::TMP::MakeIndices
Definition: TMP.h:473
Gorgon::Input::Keyboard::Keycodes::U
constexpr Key U
Definition: Keyboard.h:100
Gorgon::TMP::RTTH::RefType
RTTS & RefType
Definition: TMP.h:375
Gorgon::TMP::RTTH::ConstPtrType
RTTS & ConstPtrType
Definition: TMP.h:375
Gorgon::TMP::MakeFunctionFromMember_helper
std::function< Ret_(Args...) > MakeFunctionFromMember_helper(Ret_(T::*pm)(Args...), T *that, IntTuple< Indices... >)
Definition: TMP.h:476
Gorgon::TMP::RemoveRValueReference
Definition: TMP.h:415
Gorgon::TMP::Placeholder< 7 >::value
static decltype(std::placeholders::_7) value()
Definition: TMP.h:450
Gorgon::TMP::FunctionTraits< R_(Args_...)>::Arguments::Type
typename std::tuple_element< N, std::tuple< Args_... > >::type Type
Type of the argument.
Definition: TMP.h:77
Gorgon::TMP::IsStreamable
Definition: TMP.h:426
Gorgon::TMP::RTT
Runtime Type. This class implements both RTTS and RTTI.
Definition: TMP.h:210
Gorgon::TMP::StaticStrEqual
constexpr bool StaticStrEqual(const char(&str1)[N1_], const char(&str2)[N2_])
Definition: TMP.h:38
Gorgon::TMP::Placeholder< 6 >::value
static decltype(std::placeholders::_6) value()
Definition: TMP.h:449
Gorgon::Input::Keyboard::Keycodes::S
constexpr Key S
Definition: Keyboard.h:98
Gorgon::TMP::HasParanthesisOperator::no
Definition: TMP.h:489
Gorgon::Input::Keyboard::Keycodes::T
constexpr Key T
Definition: Keyboard.h:99
Gorgon::TMP::RTTC
Runtime type class, implements RTTH.
Definition: TMP.h:386
Gorgon::TMP::Placeholder< 1 >::value
static decltype(std::placeholders::_1) value()
Definition: TMP.h:444
Gorgon::TMP::Choose
This acts like ? operator between two types.
Definition: TMP.h:128
Gorgon::TMP::HasParanthesisOperator
Definition: TMP.h:487
Gorgon::TMP::RTTH
Runtime Type Hierarchy.
Definition: TMP.h:364
Gorgon::TMP::Sequence
A sequence element, can be used to represent a sequence of integer numbers.
Definition: TMP.h:15
Gorgon::TMP::Placeholder
Solution by Peter Dimov-5: http://std.2283326.n4.nabble.com/bind-Possible-to-use-variadic-templates-w...
Definition: TMP.h:443
Gorgon::TMP::Placeholder< 2 >::value
static decltype(std::placeholders::_2) value()
Definition: TMP.h:445
Gorgon::TMP::RTTI::GetSize
virtual long GetSize() const =0
Returns the size of the object.
Gorgon::TMP::AbstractRTT
Runtime Type. This class implements both RTTS and RTTI.
Definition: TMP.h:283
Gorgon::Input::Keyboard::Keycodes::N
constexpr Key N
Definition: Keyboard.h:93
Gorgon::TMP::Generate
Generates a sequence from 0 to the given value.
Definition: TMP.h:18
Gorgon::TMP::RTTI::TypeInfo
virtual const std::type_info & TypeInfo() const =0
Gorgon::TMP::RTTI::IsPointer
virtual bool IsPointer() const =0
Returns if this type is pointer.
Gorgon::TMP::AbstractRTT< void >
Runtime Type. This class implements both RTTS and RTTI.
Definition: TMP.h:323
Gorgon::TMP::RemoveRValueReference< T_ && >::Type
T_ Type
Definition: TMP.h:421
Gorgon
Root namespace for Gorgon Game Engine.
Definition: Any.h:19
Gorgon::TMP::MakeIndices_impl< I, IntTuple< Indices... > >::type
IntTuple< Indices... > type
Definition: TMP.h:469
Gorgon::TMP::AbstractRTTC
Runtime type class, implements RTTH.
Definition: TMP.h:401
Gorgon::TMP::RTTH::NormalType
RTTS & NormalType
Definition: TMP.h:375
Gorgon::TMP::Placeholder< 8 >::value
static decltype(std::placeholders::_8) value()
Definition: TMP.h:451
Gorgon::TMP::RTTH::ConstRefType
RTTS & ConstRefType
Definition: TMP.h:375
Gorgon::TMP::IsStreamable::Value
static const bool Value
Definition: TMP.h:438
Gorgon::TMP::RTTC::RTTC
RTTC()
Definition: TMP.h:390
Gorgon::TMP::Placeholder< 9 >::value
static decltype(std::placeholders::_9) value()
Definition: TMP.h:452
Gorgon::TMP::RTTI::IsReference
virtual bool IsReference() const =0
Returns if this type is a reference.
Gorgon::TMP::RTTS::Delete
virtual void Delete(void *obj) const =0
Deletes the given object.
Gorgon::TMP::HasParanthesisOperator::impl
static yes impl(T *)
Definition: TMP.h:491
Gorgon::Input::Keyboard::Keycodes::I
constexpr Key I
Definition: Keyboard.h:88
Gorgon::TMP::IntTuple
Definition: TMP.h:454
Gorgon::TMP::RTTS
This class contains runtime type services that allows dealing with unknown type.
Definition: TMP.h:190
Gorgon::TMP::AbstractRTTC::BaseType
typename std::remove_const< typename std::remove_reference< T_ >::type >::type BaseType
Definition: TMP.h:403
Gorgon::TMP::static_strequal_helper
constexpr bool static_strequal_helper(const char *a, const char *b, unsigned len)
Definition: TMP.h:33
Gorgon::TMP::Placeholder< 5 >::value
static decltype(std::placeholders::_5) value()
Definition: TMP.h:448
Gorgon::TMP::clonetype_wnull
std::enable_if< std::is_copy_constructible< T_ >::value &&!std::is_abstract< T_ >::value, void * >::type clonetype_wnull(const void *const obj)
Definition: TMP.h:254
Gorgon::TMP::RTTI
This class contains information about a runtime type.
Definition: TMP.h:143
Gorgon::TMP::HasParanthesisOperator::yes
char yes
Definition: TMP.h:488
Gorgon::TMP::RTTS::Duplicate
virtual RTTS * Duplicate() const =0
Duplicates this service.
Gorgon::TMP::HasParanthesisOperator::no::_
char _[2]
Definition: TMP.h:489
Gorgon::TMP::RTTS::Clone
virtual void * Clone(const void *const obj) const =0
Clones the given object.
Gorgon::TMP::RTTI::Name
std::string Name() const
Returns human readable name of the type.
Definition: TMP.h:184
Gorgon::TMP::RTTH::ConstType
RTTS & ConstType
Definition: TMP.h:375
Gorgon::TMP::MakeFunctionFromMember
std::function< Ret_(Args...) > MakeFunctionFromMember(Ret_(T_::*pm)(Args...), T_ *that)
Definition: TMP.h:482
Gorgon::TMP::HasParanthesisOperator::value
@ value
Definition: TMP.h:494
Gorgon::GL::UBOBindingPoint::Type
Type
Definition: Shader.h:14
Gorgon::TMP::AbstractRTTC::AbstractRTTC
AbstractRTTC()
Definition: TMP.h:405
Gorgon::TMP::Placeholder< 3 >::value
static decltype(std::placeholders::_3) value()
Definition: TMP.h:446
Gorgon::TMP::MakeIndices_impl
Definition: TMP.h:458
Gorgon::TMP::RTTI::IsSameType
virtual bool IsSameType(const std::type_info &) const =0
Compares the type stored with this service to the given type info.
Gorgon::TMP::Placeholder< 4 >::value
static decltype(std::placeholders::_4) value()
Definition: TMP.h:447
Gorgon::TMP::RTTS::~RTTS
virtual ~RTTS()
Destructor.
Definition: TMP.h:205
Gorgon::TMP::RTTH::PtrType
RTTS & PtrType
Definition: TMP.h:375
Gorgon::TMP::RTTH::~RTTH
virtual ~RTTH()
Definition: TMP.h:366
Gorgon::TMP::RTTI::IsSameType
bool IsSameType() const
Compares the type stored with this service to the given type.
Definition: TMP.h:159
Gorgon::TMP::HasParanthesisOperator::impl
static no impl(...)
Definition: TMP.h:492
Gorgon::TMP::RTTS::Clone
virtual void Clone(void *const dest, const void *const obj) const =0
Clones the given object.
Gorgon::TMP::RTTI::IsConstant
virtual bool IsConstant() const =0
Returns if this type is a constant.
Gorgon::TMP::MakeIndices_impl< I, IntTuple< Indices... >, T, Types... >::type
MakeIndices_impl< I+1, IntTuple< Indices..., I >, Types... >::type type
Definition: TMP.h:464
Gorgon::TMP::FunctionTraits< R_(Args_...)>::ReturnType
R_ ReturnType
Return type of the function.
Definition: TMP.h:62
Gorgon::TMP::RTTH::RTTH
RTTH(RTTS &normaltype, RTTS &consttype, RTTS &reftype, RTTS &constreftype, RTTS &ptrtype, RTTS &constptrtype)
Definition: TMP.h:378
Gorgon::TMP::RemoveRValueReference::Type
T_ Type
Definition: TMP.h:416
Gorgon::TMP::RTTI::operator==
bool operator==(const std::type_info &info) const
Definition: TMP.h:163
Gorgon::TMP::RTTC::BaseType
typename std::remove_const< typename std::remove_reference< T_ >::type >::type BaseType
Definition: TMP.h:388
Gorgon::TMP::RTTI::operator!=
bool operator!=(const std::type_info &info) const
Definition: TMP.h:167
Gorgon::TMP::copytype_wnull
std::enable_if< std::is_copy_assignable< T_ >::value &&!std::is_const< T_ >::value, void >::type copytype_wnull(void *const dest, const void *const obj)
Definition: TMP.h:269