OmniSciDB  5ade3759e0
GenericTypeUtilities.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename... TYPE_ARGS, typename T >
bool is_pointer_castable_to (T *ptr)
 

Function Documentation

◆ is_pointer_castable_to()

template<typename... TYPE_ARGS, typename T >
bool is_pointer_castable_to ( T *  ptr)

Definition at line 21 of file GenericTypeUtilities.h.

21  {
22  bool cast_succeeded = false;
23  [[gnu::unused]] bool discard[] = {
24  (cast_succeeded |= (dynamic_cast<TYPE_ARGS const*>(ptr)) != nullptr)...};
25  return cast_succeeded;
26 }