uTL
micro Template library
stl.h File Reference

STL's Concepts. More...

#include <utl/core/impl.h>
#include <utl/meta/meta.h>
#include <utl/utility/invoke.h>
#include <utl/concepts/defines.h>

Go to the source code of this file.

Classes

struct  utl::common_impl::__copy_cv_< From >
 
struct  utl::common_impl::__copy_cv_< const From >
 
struct  utl::common_impl::__copy_cv_< volatile From >
 
struct  utl::common_impl::__copy_cv_< const volatile From >
 
struct  utl::common_impl::__common_ref_< T, U, class >
 
struct  utl::common_impl::__common_ref_< T &, U &, meta::void_t< __lref_res< T, U >, meta::when< std::is_reference< __lref_res< T, U > >::value > > >
 
struct  utl::common_impl::__common_ref_< T &&, U &&, meta::void_t< __common_ref< T &, U & >, meta::when< ConvertibleTo< T &&, __rref_res< T, U > > >, meta::when< ConvertibleTo< U &&, __rref_res< T, U > > > > >
 
struct  utl::common_impl::__common_ref_< T &&, U &, meta::void_t< __common_ref< const T &, U & >, meta::when< ConvertibleTo< T &&, __common_ref< const T &, U & > > > > >
 
struct  utl::common_impl::__common_ref_< T &, U &&, meta::void_t< __common_ref< T &, const U & >, meta::when< ConvertibleTo< U &&, __common_ref< T &, const U & > > > > >
 
struct  utl::common_impl::__xref< class >
 
struct  utl::common_impl::__xref< const T >
 
struct  utl::common_impl::__xref< volatile T >
 
struct  utl::common_impl::__xref< const volatile T >
 
struct  utl::common_impl::__xref< T & >
 
struct  utl::common_impl::__xref< T && >
 
struct  utl::common_impl::basic_common_reference< class, class, class, class >
 
struct  utl::common_impl::common_reference<... >
 
struct  utl::common_impl::common_reference< T >
 
struct  utl::common_impl::__common_reference3< T, U,... >
 
struct  utl::common_impl::__common_reference3< T, U, meta::void_t< __cond_res< T, U > > >
 
struct  utl::common_impl::__common_reference2< T, U,... >
 
struct  utl::common_impl::__common_reference2< T, U, meta::void_t< __basic_common_reference_t< T, U > > >
 
struct  utl::common_impl::__common_reference< T, U,... >
 
struct  utl::common_impl::__common_reference< T, U, meta::when< std::is_reference< T >::value &&std::is_reference< U >::value > >
 
struct  utl::common_impl::common_reference< T, U >
 
struct  utl::common_impl::common_reference< T, U, V, W... >
 
struct  utl::details::is_boolean_< B, typename >
 
struct  utl::details::is_boolean_< B, meta::void_t< meta::use_if_same_t< bool, decltype(!std::declval< cref_< B >>())>, meta::use_if_same_t< bool, decltype(std::declval< cref_< B >>()==std::declval< cref_< B >>())>, meta::use_if_same_t< bool, decltype(std::declval< cref_< B >>() !=std::declval< cref_< B >>())>, meta::use_if_same_t< bool, decltype(std::declval< cref_< B >>() &&std::declval< cref_< B >>())>, meta::use_if_same_t< bool, decltype(std::declval< cref_< B >>()||std::declval< cref_< B >>())> > >
 
struct  utl::details::is_weakly_equality_comparable_with_< T, U, typename >
 
struct  utl::details::is_weakly_equality_comparable_with_< T, U, meta::void_t< meta::use_if_same_t< bool, decltype(std::declval< cref_< T >>()==std::declval< cref_< U >>())>, meta::use_if_same_t< bool, decltype(std::declval< cref_< T >>() !=std::declval< cref_< U >>())>, meta::use_if_same_t< bool, decltype(std::declval< cref_< U >>()==std::declval< cref_< T >>())>, meta::use_if_same_t< bool, decltype(std::declval< cref_< U >>() !=std::declval< cref_< T >>())> > >
 
struct  utl::details::is_strict_totally_ordered_< T, typename >
 
struct  utl::details::is_strict_totally_ordered_< T, meta::void_t< meta::use_if_same_t< bool, decltype(std::declval< cref_< T >>()< std::declval< cref_< T >>())>, meta::use_if_same_t< bool, decltype(std::declval< cref_< T >>() > std::declval< cref_< T >>())>, meta::use_if_same_t< bool, decltype(std::declval< cref_< T >>()<=std::declval< cref_< T >>())>, meta::use_if_same_t< bool, decltype(std::declval< cref_< T >>() >=std::declval< cref_< T >>())> > >
 
struct  utl::details::is_strict_totally_ordered_with_< T, U, typename >
 
struct  utl::details::is_strict_totally_ordered_with_< T, U, meta::void_t< meta::use_if_same_t< bool, decltype(std::declval< cref_< T >>()< std::declval< cref_< U >>())>, meta::use_if_same_t< bool, decltype(std::declval< cref_< T >>() > std::declval< cref_< U >>())>, meta::use_if_same_t< bool, decltype(std::declval< cref_< T >>()<=std::declval< cref_< U >>())>, meta::use_if_same_t< bool, decltype(std::declval< cref_< T >>() >=std::declval< cref_< U >>())>, meta::use_if_same_t< bool, decltype(std::declval< cref_< U >>()< std::declval< cref_< T >>())>, meta::use_if_same_t< bool, decltype(std::declval< cref_< U >>() > std::declval< cref_< T >>())>, meta::use_if_same_t< bool, decltype(std::declval< cref_< U >>()<=std::declval< cref_< T >>())>, meta::use_if_same_t< bool, decltype(std::declval< cref_< U >>() >=std::declval< cref_< T >>())> > >
 

Namespaces

 utl
 STL's core language concepts.
 
 utl::common_impl
 
 utl::details
 

Typedefs

template<typename T >
using utl::remove_cvref_t = std::remove_cv_t< std::remove_reference_t< T > >
 
template<typename T >
using utl::cref_ = const std::remove_reference_t< T > &
 
template<typename T >
using utl::_ref_t = std::add_lvalue_reference_t< T >
 
template<typename _T1 , typename _T2 , typename _Ret = _T1>
using utl::use_if_same_t = meta::eval< meta::enable_if< meta::same_< _T1, _T2 >::value, _Ret > >
 
template<class T , class U >
using utl::common_impl::__cond_res = decltype(false ? std::declval< T(&)()>()() :std::declval< U(&)()>()())
 
template<class From , class To >
using utl::common_impl::__copy_cv = meta::invoke< __copy_cv_< From >, To >
 
template<class T >
using utl::common_impl::__cref = std::add_lvalue_reference_t< const std::remove_reference_t< T > >
 
template<class T , class U >
using utl::common_impl::__common_ref = meta::eval< __common_ref_< T, U > >
 
template<class T , class U >
using utl::common_impl::__lref_res = __cond_res< __copy_cv< T, U > &, __copy_cv< U, T > &>
 
template<class T , class U , class R = __common_ref<T&, U&>>
using utl::common_impl::__rref_res = std::remove_reference_t< R > &&
 
template<class T , class U >
using utl::common_impl::__basic_common_reference_t = meta::eval< basic_common_reference< remove_cvref_t< T >, remove_cvref_t< U >, __xref< T >::template apply, __xref< U >::template apply > >
 
template<class... Ts>
using utl::common_impl::common_reference_t = meta::eval< common_reference< Ts... > >
 
template<typename B >
using utl::details::is_boolean_t = meta::eval< is_boolean_< B > >
 
template<typename T , typename U >
using utl::details::is_weakly_equality_comparable_with_t = meta::eval< is_weakly_equality_comparable_with_< T, U > >
 
template<typename T >
using utl::details::is_strict_totally_ordered_t = meta::eval< is_strict_totally_ordered_< T > >
 
template<typename T , typename U >
using utl::details::is_strict_totally_ordered_with_t = meta::eval< is_strict_totally_ordered_with_< T, U > >
 
template<typename... Ts>
using utl::common_reference = common_impl::common_reference< Ts... >
 
template<typename... Ts>
using utl::common_reference_t = meta::eval< common_reference< Ts... > >
 

Variables

template<class T , class U >
_utlConcept utl::Same = meta::same_<T, U>::value
 
template<class Derived , class Base >
_utlConcept utl::DerivedFrom
 
template<class From , class To >
_utlConcept utl::ConvertibleTo = std::is_convertible<From, To>::value
 
template<class T , class U >
_utlConcept utl::CommonReference
 
template<class T , class U >
_utlConcept utl::Common
 
template<class T >
_utlConcept utl::Integral = std::is_integral<T>::value
 
template<class T >
_utlConcept utl::SignedIntegral = Integral<T> && std::is_signed<T>::value
 
template<class T >
_utlConcept utl::UnsignedIntegral = Integral<T> && !std::is_signed<T>::value
 
template<typename T >
_utlConcept utl::MoveAssignable = std::is_move_assignable<T>::value
 
template<typename T >
_utlConcept utl::CopyAssignable = std::is_copy_assignable<T>::value
 
template<class LHS , class RHS >
_utlConcept utl::Assignable
 
template<class T >
_utlConcept utl::Destructible = std::is_nothrow_destructible<T>::value
 
template<class T , class... Args>
_utlConcept utl::Constructible
 
template<class T >
_utlConcept utl::DefaultConstructible = Constructible<T>
 
template<class T >
_utlConcept utl::MoveConstructible
 
template<class T >
_utlConcept utl::CopyConstructible
 
template<class T >
_utlConcept utl::Movable
 
template<class T >
_utlConcept utl::Copyable
 
template<class B >
_utlConcept utl::Boolean
 
template<class T , class U >
_utlConcept utl::WeaklyEqualityComparableWith
 
template<class T >
_utlConcept utl::EqualityComparable = WeaklyEqualityComparableWith<T, T>
 
template<class T , class U >
_utlConcept utl::EqualityComparableWith
 
template<class T >
_utlConcept utl::StrictTotallyOrdered
 
template<class T , class U >
_utlConcept utl::StrictTotallyOrderedWith
 
template<class T >
_utlConcept utl::Semiregular = Copyable<T> && DefaultConstructible<T>
 
template<class T >
_utlConcept utl::Regular = Semiregular<T> && EqualityComparable<T>
 
template<class T >
_utlConcept utl::Scalar
 
template<class T >
_utlConcept utl::Arithmetic
 
template<class T >
_utlConcept utl::FloatingPoint
 
template<class F , class... Args>
_utlConcept utl::Invocable = is_invocable<F, Args...>::value
 
template<class F , class... Args>
_utlConcept utl::RegularInvocable = Invocable<F, Args...>
 
template<class F , class... Args>
_utlConcept utl::Predicate
 
template<class R , class T , class U >
_utlConcept utl::Relation
 
template<class R , class T , class U >
_utlConcept utl::StrictWeakOrder = Relation<R, T, U>
 
using utl::is_swappable = std::is_swappable
 
using utl::is_swappable_with = std::is_swappable_with
 
template<class T , class U >
_utlConcept utl::SwappableWith
 
template<class T >
_utlConcept utl::Swappable = is_swappable_with<T, T>::type::value
 

Detailed Description

STL's Concepts.

Copyright (C) 2018 - 2019 Christos Choutouridis

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file stl.h.