17 template <
bool B,
class T =
void>
25 template <
typename... Args>
31 template <
typename... Ts>
37 template <
typename... Ts>
44 template <
typename T,
typename =
void>
53 T,
void_t<decltype(++
std::declval<T &>()), decltype(*std::declval<T &>()),
54 decltype(std::declval<T &>() == std::declval<T &>())>>
70 template <
typename T,
typename V>
73 std::is_same<typename std::iterator_traits<T>::value_type,
77 template <
bool IsConst,
typename T>
78 using ConstSwitch =
typename std::conditional<IsConst, const T, T>::type;
91 template <
typename OutputType>
95 template <
typename... Args>
107 template <
typename Container,
108 typename _value_type =
typename Container::value_type,
119 return container[index];
125 return container[index];
130 return container[i][j];
136 return container[i][j];
141 return container[index];
146 return container[index];
151 return container[i][j];
157 return container[i][j];
162 template <
typename Container,
163 typename _value_type =
typename Container::value_type,
174 return container(index);
180 return container(index);
185 return container(i, j);
191 return container(i, j);
196 return container(index);
201 return container(index);
206 return container(i, j);
212 return container(i, j);
220 template <
typename TupleType,
typename F>
222 typedef typename std::tuple_element<I - 1, TupleType>::type ElementType;
223 f.template eval<ElementType>();
230 template <
typename TupleType,
typename F>
232 typedef typename std::tuple_element<0, TupleType>::type ElementType;
233 return f.template eval<ElementType>();
237 template <
typename TupleType,
typename F>
247 template <
typename TupleType,
typename F>
249 typedef typename std::tuple_element<I - 1, TupleType>::type ElementType;
251 f.template eval<ElementType>();
259 template <
typename TupleType,
typename F>
261 typedef typename std::tuple_element<0, TupleType>::type ElementType;
263 f.template eval<ElementType>();
268 template <
typename TupleType,
typename F>
271 TupleType, F>(
name, f);
278 template <
typename TupleType,
typename F>
279 static void eval(std::string short_name, F f) {
280 typedef typename std::tuple_element<I - 1, TupleType>::type ElementType;
282 f.template eval<ElementType>();
290 template <
typename TupleType,
typename F>
291 static void eval(std::string short_name, F f) {
292 typedef typename std::tuple_element<0, TupleType>::type ElementType;
294 f.template eval<ElementType>();
299 template <
typename TupleType,
typename F>
302 TupleType, F>(short_name, f);
307 template <
int I,
bool IsLast>
309 template <
typename TupleType,
typename F>
311 f.template eval<I>();
313 I + 1>::template eval<TupleType, F>(f);
319 template <
typename TupleType,
typename F>
321 return f.template eval<I>();
327 template <
typename TupleType,
typename F>
330 1>::template eval<TupleType, F>(f);
335 template <
typename T,
typename Tuple>
338 template <
typename T>
341 template <
typename T,
typename U,
typename... Ts>
344 template <
typename T,
typename... Ts>
void for_each_type(F f=F())
void for_type_short(std::string short_name, F f=F())
void for_type(std::string name, F f=F())
std::enable_if< is_iterator< T >::type::value, void > enable_if_iterator
Template alias to enable a template function via SFINAE for any iterator.
void for_each_element(F f=F())
Call f.eval<I>(), for int I in range [0, std::tuple_size<TupleType>::value)
std::enable_if< is_iterator< T >::type::value &&std::is_same< typename std::iterator_traits< T >::value_type, V >::type::value, void > enable_if_iterator_of
Template alias to enable a template function via SFINAE for an iterator with value_type V.
typename std::conditional< IsConst, const T, T >::type ConstSwitch
typename make_void< Ts... >::type void_t
Alias for void, to help SFINAE work.
void ignore_returnvalues(Args &&...)
Enables calling a function on each argument in a parameter pack.
Traits const & traits(std::string const &dof_key)
Lookup DoFType::Traits in the global dictionary.
typename std::enable_if< B, T >::type enable_if_t
GenericDatumFormatter< std::string, DataObject > name()
Helper Functor for Counter container access using operator[].
static const value_type & at(const Container &container, size_type i, size_type j)
Identical to 'return container[i][j];'.
const value_type & operator()(const Container &container, size_type index) const
Identical to 'return container[index];'.
BracketAccess & operator=(const BracketAccess &)
static value_type & at(Container &container, size_type index)
Identical to 'return container[index];'.
static const value_type & at(const Container &container, size_type index)
Identical to 'return container[index];'.
const value_type & operator()(const Container &container, size_type i, size_type j) const
Identical to 'return container[i][j];'.
value_type & operator()(Container &container, size_type index) const
Identical to 'return container[index];'.
value_type & operator()(Container &container, size_type i, size_type j) const
Identical to 'return container[i][j];'.
static value_type & at(Container &container, size_type i, size_type j)
Identical to 'return container[i][j];'.
N-nary function that behaves as a constant (i.e. transform(arg1,arg2,...) == constant is true)
OutputType operator()(Args const &... args) const
ConstantFunctor(OutputType const &_const)
Helper Functor for Counter container access using operator()
value_type & operator()(Container &container, size_type index) const
Identical to 'return container(index);'.
static const value_type & at(const Container &container, size_type index)
Identical to 'return container(index);'.
static value_type & at(Container &container, size_type index)
Identical to 'return container(index);'.
const value_type & operator()(const Container &container, size_type index) const
Identical to 'return container(index);'.
static value_type & at(Container &container, size_type i, size_type j)
Identical to 'return container(i,j);'.
const value_type & operator()(const Container &container, size_type i, size_type j) const
Identical to 'return container(index);'.
static const value_type & at(const Container &container, size_type i, size_type j)
Identical to 'return container(i,j);'.
value_type & operator()(Container &container, size_type i, size_type j) const
Identical to 'return container(index);'.
ParenthesesAccess & operator=(const ParenthesesAccess &)
Unary transformation that behaves as Identity (i.e. transform(arg) == arg is true)
T operator()(T const &arg) const
static void eval(std::string name, F f)
static void eval(std::string name, F f)
static void eval(std::string short_name, F f)
static void eval(std::string short_name, F f)
Base type inherits from std::false_type if T is not iterator.
Alias for void, to help SFINAE work.