dune-functions  2.5.1
Classes | Namespaces | Typedefs | Functions
type_traits.hh File Reference
#include <type_traits>
#include <dune/common/typeutilities.hh>

Go to the source code of this file.

Classes

struct  Dune::Functions::HasStaticSize< T >
 Check if type is a statically sized container. More...
 
struct  Dune::Functions::StaticSize< T >
 Obtain size of statically sized container. More...
 

Namespaces

 Dune
 
 Dune::Functions
 
 Dune::Functions::Imp
 

Typedefs

template<class T , class... Args>
using Dune::Functions::enableIfConstructible = typename std::enable_if< std::is_constructible< T, Args... >::value, int >::type
 Helper to constrain forwarding constructors. More...
 

Functions

template<class T >
constexpr auto Dune::Functions::Imp::staticSize (const T *, const PriorityTag< 0 > &) -> decltype(std::integral_constant< std::size_t, T::size()>())
 
template<class T >
constexpr auto Dune::Functions::Imp::staticSize (const T *, const PriorityTag< 1 > &) -> decltype(std::integral_constant< std::size_t, T().size()>())
 
template<class T >
constexpr auto Dune::Functions::Imp::staticSize (const T *, const PriorityTag< 2 > &) -> decltype(std::integral_constant< std::size_t, std::tuple_size< T >::value >())
 
template<class T >
constexpr std::false_type Dune::Functions::Imp::hasStaticSize (const T *t, const PriorityTag< 0 > &p)
 
template<class T >
constexpr auto Dune::Functions::Imp::hasStaticSize (const T *t, const PriorityTag< 1 > &p) -> decltype(staticSize(t, PriorityTag< 42 >()), std::true_type())