CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM_TMP.hh File Reference
#include <cassert>
#include <iterator>
#include <string>
#include <tuple>
#include <type_traits>
#include "casm/misc/CRTPBase.hh"

Go to the source code of this file.

Classes

struct  CASM::CASM_TMP::make_void< Ts >
 Alias for void, to help SFINAE work. More...
 
struct  CASM::CASM_TMP::is_iterator< T, typename >
 Base type inherits from std::false_type if T is not iterator. More...
 
struct  CASM::CASM_TMP::is_iterator< T, void_t< decltype(++std::declval< T & >()), decltype(*std::declval< T & >()), decltype(std::declval< T & >()==std::declval< T & >())> >
 Specialized case inherits from std::true_type if T is an iterator. More...
 
struct  CASM::CASM_TMP::UnaryIdentity< T >
 Unary transformation that behaves as Identity (i.e. transform(arg) == arg is true) More...
 
struct  CASM::CASM_TMP::ConstantFunctor< OutputType >
 N-nary function that behaves as a constant (i.e. transform(arg1,arg2,...) == constant is true) More...
 
struct  CASM::CASM_TMP::BracketAccess< Container, _value_type, _size_type >
 Helper Functor for Counter container access using operator[]. More...
 
struct  CASM::CASM_TMP::ParenthesesAccess< Container, _value_type, _size_type >
 Helper Functor for Counter container access using operator() More...
 
struct  CASM::CASM_TMP::for_each_type_impl< I >
 
struct  CASM::CASM_TMP::for_each_type_impl< 1 >
 
struct  CASM::CASM_TMP::for_type_impl< I >
 
struct  CASM::CASM_TMP::for_type_impl< 1 >
 
struct  CASM::CASM_TMP::for_type_short_impl< I >
 
struct  CASM::CASM_TMP::for_type_short_impl< 1 >
 
struct  CASM::CASM_TMP::for_each_element_impl< I, IsLast >
 
struct  CASM::CASM_TMP::for_each_element_impl< I, true >
 
struct  CASM::CASM_TMP::has_type< T, std::tuple<> >
 
struct  CASM::CASM_TMP::has_type< T, std::tuple< U, Ts... > >
 
struct  CASM::CASM_TMP::has_type< T, std::tuple< T, Ts... > >
 

Namespaces

 CASM
 Main CASM namespace.
 
 CASM::CASM_TMP
 

Typedefs

template<bool B, class T = void>
using CASM::enable_if_t = typename std::enable_if< B, T >::type
 
template<typename... Ts>
using CASM::CASM_TMP::void_t = typename make_void< Ts... >::type
 Alias for void, to help SFINAE work. More...
 
template<typename T >
using CASM::CASM_TMP::enable_if_iterator = std::enable_if< is_iterator< T >::type::value, void >
 Template alias to enable a template function via SFINAE for any iterator. More...
 
template<typename T , typename V >
using CASM::CASM_TMP::enable_if_iterator_of = std::enable_if< is_iterator< T >::type::value &&std::is_same< typename std::iterator_traits< T >::value_type, V >::type::value, void >
 Template alias to enable a template function via SFINAE for an iterator with value_type V. More...
 
template<bool IsConst, typename T >
using CASM::CASM_TMP::ConstSwitch = typename std::conditional< IsConst, const T, T >::type
 

Functions

template<typename... Args>
void CASM::CASM_TMP::ignore_returnvalues (Args &&...)
 Enables calling a function on each argument in a parameter pack. More...
 
template<typename TupleType , typename F >
void CASM::CASM_TMP::for_each_type (F f=F())
 
template<typename TupleType , typename F >
void CASM::CASM_TMP::for_type (std::string name, F f=F())
 
template<typename TupleType , typename F >
void CASM::CASM_TMP::for_type_short (std::string short_name, F f=F())
 
template<typename TupleType , typename F >
void CASM::CASM_TMP::for_each_element (F f=F())
 Call f.eval<I>(), for int I in range [0, std::tuple_size<TupleType>::value) More...