Templates.hpp File Reference
#include <PlayRho/Defines.hpp>
#include <algorithm>
#include <functional>
#include <iterator>
#include <limits>
#include <typeinfo>
#include <type_traits>
#include <tuple>
#include <utility>
Go to the source code of this file.
Classes | |
struct | playrho::detail::Voidify<... > |
Voiding template class. More... | |
struct | playrho::detail::IsIterableImpl< T, class > |
Low-level implementation of the is-iterable default value trait. More... | |
struct | playrho::detail::IsIterableImpl< T, VoidT< decltype(begin(std::declval< T >())), decltype(end(std::declval< T >())), decltype(++std::declval< decltype(begin(std::declval< T & >()))& >()), decltype(*begin(std::declval< T >())) > > |
Low-level implementation of the is-iterable true value trait. More... | |
struct | playrho::IsEqualityComparable< T1, T2, class > |
Template for determining if the given type is an equality comparable type. More... | |
struct | playrho::IsEqualityComparable< T1, T2, detail::VoidT< decltype(T1{}==T2{})> > |
Template specialization for equality comparable types. More... | |
struct | playrho::IsInequalityComparable< T1, T2, class > |
Template for determining if the given type is an inequality comparable type. More... | |
struct | playrho::IsInequalityComparable< T1, T2, detail::VoidT< decltype(T1{} !=T2{})> > |
Template specialization for inequality comparable types. More... | |
struct | playrho::IsAddable< T1, T2, class > |
Template for determining if the given types are addable. More... | |
struct | playrho::IsAddable< T1, T2, detail::VoidT< decltype(T1{}+T2{})> > |
Template specializing for addable types. More... | |
struct | playrho::IsMultipliable< T1, T2, class > |
Template for determining if the given types are multipliable. More... | |
struct | playrho::IsMultipliable< T1, T2, detail::VoidT< decltype(T1{} *T2{})> > |
Template specializing for multipliable types. More... | |
struct | playrho::IsDivisable< T1, T2, class > |
Template for determining if the given types are divisable. More... | |
struct | playrho::IsDivisable< T1, T2, detail::VoidT< decltype(T1{}/T2{})> > |
Template specializing for divisable types. More... | |
struct | playrho::IsArithmetic< T, class > |
Template for determining if the given type is an "arithmetic" type. More... | |
struct | playrho::IsArithmetic< T, detail::VoidT< decltype(T{}+T{}), decltype(T{} - T{}), decltype(T{} *T{}), decltype(T{}/T{}) > > |
Template specialization for valid/acceptable "arithmetic" types. More... | |
struct | playrho::HasType< T, Tuple > |
Has-type trait template class. More... | |
struct | playrho::HasType< T, std::tuple<> > |
Has-type trait template class specialized for std::tuple classes. More... | |
struct | playrho::HasType< T, std::tuple< T, Ts... > > |
Has-type trait true class. More... | |
struct | playrho::HasType< T, std::tuple< U, Ts... > > |
Has-type trait template super class. More... | |
struct | playrho::LexicographicalLess< T > |
Function object for performing lexicographical less-than comparisons of containers. More... | |
struct | playrho::LexicographicalGreater< T > |
Function object for performing lexicographical greater-than comparisons of containers. More... | |
struct | playrho::LexicographicalLessEqual< T > |
Function object for performing lexicographical less-than or equal-to comparisons of containers. More... | |
struct | playrho::LexicographicalGreaterEqual< T > |
Function object for performing lexicographical greater-than or equal-to comparisons of containers. More... | |
Namespaces | |
playrho | |
playrho::detail | |
Typedefs | |
template<class... Ts> | |
using | playrho::detail::VoidT = typename Voidify< Ts... >::type |
Void type templated alias. More... | |
template<class T > | |
using | playrho::IsIterable = typename detail::IsIterableImpl< T > |
Determines whether the given type is an iterable type. More... | |
template<typename T , typename Tuple > | |
using | playrho::TupleContainsType = typename HasType< T, Tuple >::type |
Tuple contains type alias. More... | |
Functions | |
template<class T > | |
PLAYRHO_CONSTEXPR auto | playrho::detail::max_size (const T &arg) -> decltype(arg.max_size()) |
Gets the maximum size of the given container. More... | |
template<class T > | |
PLAYRHO_CONSTEXPR auto | playrho::detail::IsFull (const T &arg) -> decltype(size(arg)==max_size(arg)) |
Checks whether the given container is full. More... | |
template<class... T> | |
void | playrho::NOT_USED (T &&...) |
"Not used" annotator. More... | |
template<> | |
PLAYRHO_CONSTEXPR d2::AABB | playrho::GetInvalid () noexcept |
Gets an invalid AABB value. More... | |
template<typename T > | |
PLAYRHO_CONSTEXPR bool | playrho::IsValid (const T &value) noexcept |
Determines if the given value is valid. More... | |
template<> | |
PLAYRHO_CONSTEXPR bool | playrho::IsValid (const std::size_t &value) noexcept |
Determines if the given value is valid. More... | |
template<class T > | |
const PLAYRHO_CONSTEXPR T * | playrho::GetPtr (const T *value) noexcept |
Gets a pointer for the given variable. More... | |
template<class T > | |
PLAYRHO_CONSTEXPR T * | playrho::GetPtr (T *value) noexcept |
Gets a pointer for the given variable. More... | |
template<class T > | |
const PLAYRHO_CONSTEXPR T * | playrho::GetPtr (const T &value) noexcept |
Gets a pointer for the given variable. More... | |
template<class T > | |
PLAYRHO_CONSTEXPR T * | playrho::GetPtr (T &value) noexcept |
Gets a pointer for the given variable. More... | |
template<class T > | |
const PLAYRHO_CONSTEXPR T & | playrho::GetRef (const T *value) noexcept |
Gets a reference for the given variable. More... | |
template<class T > | |
PLAYRHO_CONSTEXPR T & | playrho::GetRef (T *value) noexcept |
Gets a reference for the given variable. More... | |
template<class T > | |
const PLAYRHO_CONSTEXPR T & | playrho::GetRef (const T &value) noexcept |
Gets a reference for the given variable. More... | |
template<class T > | |
PLAYRHO_CONSTEXPR T & | playrho::GetRef (T &value) noexcept |
Gets a reference for the given variable. More... | |
template<typename T > | |
bool | playrho::Visit (const T &, void *) |
Template function for visiting objects. More... | |
template<typename T > | |
const char * | playrho::GetTypeName () noexcept |
Gets the library defined name for the given type. More... | |
template<> | |
const char * | playrho::GetTypeName< float > () noexcept |
Gets a human recognizable name for the float type. More... | |
template<> | |
const char * | playrho::GetTypeName< double > () noexcept |
Gets a human recognizable name for the double type. More... | |
template<> | |
const char * | playrho::GetTypeName< long double > () noexcept |
Gets a human recognizable name for the long double type. More... | |