lar::util::details::has_dereference_class< T, Enable > Struct Template Reference

Class defining whether the specified type can be dereferenced. More...

#include <Dereference.h>

Inheritance diagram for lar::util::details::has_dereference_class< T, Enable >:

Detailed Description

template<typename T, typename Enable = void>
struct lar::util::details::has_dereference_class< T, Enable >

Class defining whether the specified type can be dereferenced.

Template Parameters
Tthe type to be tested for dereferenciation
Enabletriggers the conditional compilation

Usage:

static_assert(!has_dereference_class<int>::value, "error");
static_assert(has_dereference_class<int*>::value, "error");

Implementation details

The class is implemented by two definitions:

  1. a general one, always equivalent to std::false_type
  2. a special one, always equivalent to std::true_type, defined only if the type T can be dereferenced (that is, if *(T()) is valid)

The selection mechanism will always select the second form if available, since it is more specialized.

Definition at line 51 of file Dereference.h.


The documentation for this struct was generated from the following file: