proxsuite 0.6.7
The Advanced Proximal Optimization Toolbox
Loading...
Searching...
No Matches
tl Namespace Reference

Namespaces

namespace  detail
 \exclude
 

Classes

class  bad_optional_access
 
struct  in_place_t
 A tag type to tell optional to construct its value in-place. More...
 
class  monostate
 Used to represent an optional with no data; essentially a bool. More...
 
struct  nullopt_t
 A tag type to represent an empty optional. More...
 
class  optional
 
class  optional< T & >
 

Functions

template<class T , class U >
constexpr bool operator== (const optional< T > &lhs, const optional< U > &rhs)
 Compares two optional objects.
 
template<class T , class U >
constexpr bool operator!= (const optional< T > &lhs, const optional< U > &rhs)
 
template<class T , class U >
constexpr bool operator< (const optional< T > &lhs, const optional< U > &rhs)
 
template<class T , class U >
constexpr bool operator> (const optional< T > &lhs, const optional< U > &rhs)
 
template<class T , class U >
constexpr bool operator<= (const optional< T > &lhs, const optional< U > &rhs)
 
template<class T , class U >
constexpr bool operator>= (const optional< T > &lhs, const optional< U > &rhs)
 
template<class T >
constexpr bool operator== (const optional< T > &lhs, nullopt_t) noexcept
 Compares an optional to a nullopt
 
template<class T >
constexpr bool operator== (nullopt_t, const optional< T > &rhs) noexcept
 
template<class T >
constexpr bool operator!= (const optional< T > &lhs, nullopt_t) noexcept
 
template<class T >
constexpr bool operator!= (nullopt_t, const optional< T > &rhs) noexcept
 
template<class T >
constexpr bool operator< (const optional< T > &, nullopt_t) noexcept
 
template<class T >
constexpr bool operator< (nullopt_t, const optional< T > &rhs) noexcept
 
template<class T >
constexpr bool operator<= (const optional< T > &lhs, nullopt_t) noexcept
 
template<class T >
constexpr bool operator<= (nullopt_t, const optional< T > &) noexcept
 
template<class T >
constexpr bool operator> (const optional< T > &lhs, nullopt_t) noexcept
 
template<class T >
constexpr bool operator> (nullopt_t, const optional< T > &) noexcept
 
template<class T >
constexpr bool operator>= (const optional< T > &, nullopt_t) noexcept
 
template<class T >
constexpr bool operator>= (nullopt_t, const optional< T > &rhs) noexcept
 
template<class T , class U >
constexpr bool operator== (const optional< T > &lhs, const U &rhs)
 Compares the optional with a value.
 
template<class T , class U >
constexpr bool operator== (const U &lhs, const optional< T > &rhs)
 
template<class T , class U >
constexpr bool operator!= (const optional< T > &lhs, const U &rhs)
 
template<class T , class U >
constexpr bool operator!= (const U &lhs, const optional< T > &rhs)
 
template<class T , class U >
constexpr bool operator< (const optional< T > &lhs, const U &rhs)
 
template<class T , class U >
constexpr bool operator< (const U &lhs, const optional< T > &rhs)
 
template<class T , class U >
constexpr bool operator<= (const optional< T > &lhs, const U &rhs)
 
template<class T , class U >
constexpr bool operator<= (const U &lhs, const optional< T > &rhs)
 
template<class T , class U >
constexpr bool operator> (const optional< T > &lhs, const U &rhs)
 
template<class T , class U >
constexpr bool operator> (const U &lhs, const optional< T > &rhs)
 
template<class T , class U >
constexpr bool operator>= (const optional< T > &lhs, const U &rhs)
 
template<class T , class U >
constexpr bool operator>= (const U &lhs, const optional< T > &rhs)
 
template<class T , detail::enable_if_t< std::is_move_constructible< T >::value > * = nullptr, detail::enable_if_t< detail::is_swappable< T >::value > * = nullptr>
void swap (optional< T > &lhs, optional< T > &rhs) noexcept(noexcept(lhs.swap(rhs)))
 
template<class T = detail::i_am_secret, class U , class Ret = detail::conditional_t<std::is_same<T, detail::i_am_secret>::value, detail::decay_t<U>, T>>
constexpr optional< Ret > make_optional (U &&v)
 
template<class T , class... Args>
constexpr optional< T > make_optional (Args &&... args)
 
template<class T , class U , class... Args>
constexpr optional< T > make_optional (std::initializer_list< U > il, Args &&... args)
 

Variables

static constexpr in_place_t in_place {}
 A tag to tell optional to construct its value in-place.
 
static constexpr nullopt_t nullopt
 Represents an empty optional.
 

Function Documentation

◆ operator==() [1/5]

template<class T , class U >
constexpr bool tl::operator== ( const optional< T > & lhs,
const optional< U > & rhs )
inlineconstexpr

Compares two optional objects.

Definition at line 1577 of file tl-optional.hpp.

◆ operator!=() [1/5]

template<class T , class U >
constexpr bool tl::operator!= ( const optional< T > & lhs,
const optional< U > & rhs )
inlineconstexpr

Definition at line 1584 of file tl-optional.hpp.

◆ operator<() [1/5]

template<class T , class U >
constexpr bool tl::operator< ( const optional< T > & lhs,
const optional< U > & rhs )
inlineconstexpr

Definition at line 1590 of file tl-optional.hpp.

◆ operator>() [1/5]

template<class T , class U >
constexpr bool tl::operator> ( const optional< T > & lhs,
const optional< U > & rhs )
inlineconstexpr

Definition at line 1597 of file tl-optional.hpp.

◆ operator<=() [1/5]

template<class T , class U >
constexpr bool tl::operator<= ( const optional< T > & lhs,
const optional< U > & rhs )
inlineconstexpr

Definition at line 1602 of file tl-optional.hpp.

◆ operator>=() [1/5]

template<class T , class U >
constexpr bool tl::operator>= ( const optional< T > & lhs,
const optional< U > & rhs )
inlineconstexpr

Definition at line 1609 of file tl-optional.hpp.

◆ operator==() [2/5]

template<class T >
constexpr bool tl::operator== ( const optional< T > & lhs,
nullopt_t  )
inlineconstexprnoexcept

Compares an optional to a nullopt

Definition at line 1617 of file tl-optional.hpp.

◆ operator==() [3/5]

template<class T >
constexpr bool tl::operator== ( nullopt_t ,
const optional< T > & rhs )
inlineconstexprnoexcept

Definition at line 1623 of file tl-optional.hpp.

◆ operator!=() [2/5]

template<class T >
constexpr bool tl::operator!= ( const optional< T > & lhs,
nullopt_t  )
inlineconstexprnoexcept

Definition at line 1629 of file tl-optional.hpp.

◆ operator!=() [3/5]

template<class T >
constexpr bool tl::operator!= ( nullopt_t ,
const optional< T > & rhs )
inlineconstexprnoexcept

Definition at line 1635 of file tl-optional.hpp.

◆ operator<() [2/5]

template<class T >
constexpr bool tl::operator< ( const optional< T > & ,
nullopt_t  )
inlineconstexprnoexcept

Definition at line 1640 of file tl-optional.hpp.

◆ operator<() [3/5]

template<class T >
constexpr bool tl::operator< ( nullopt_t ,
const optional< T > & rhs )
inlineconstexprnoexcept

Definition at line 1646 of file tl-optional.hpp.

◆ operator<=() [2/5]

template<class T >
constexpr bool tl::operator<= ( const optional< T > & lhs,
nullopt_t  )
inlineconstexprnoexcept

Definition at line 1652 of file tl-optional.hpp.

◆ operator<=() [3/5]

template<class T >
constexpr bool tl::operator<= ( nullopt_t ,
const optional< T > &  )
inlineconstexprnoexcept

Definition at line 1658 of file tl-optional.hpp.

◆ operator>() [2/5]

template<class T >
constexpr bool tl::operator> ( const optional< T > & lhs,
nullopt_t  )
inlineconstexprnoexcept

Definition at line 1665 of file tl-optional.hpp.

◆ operator>() [3/5]

template<class T >
constexpr bool tl::operator> ( nullopt_t ,
const optional< T > &  )
inlineconstexprnoexcept

Definition at line 1671 of file tl-optional.hpp.

◆ operator>=() [2/5]

template<class T >
constexpr bool tl::operator>= ( const optional< T > & ,
nullopt_t  )
inlineconstexprnoexcept

Definition at line 1677 of file tl-optional.hpp.

◆ operator>=() [3/5]

template<class T >
constexpr bool tl::operator>= ( nullopt_t ,
const optional< T > & rhs )
inlineconstexprnoexcept

Definition at line 1683 of file tl-optional.hpp.

◆ operator==() [4/5]

template<class T , class U >
constexpr bool tl::operator== ( const optional< T > & lhs,
const U & rhs )
inlineconstexpr

Compares the optional with a value.

Definition at line 1691 of file tl-optional.hpp.

◆ operator==() [5/5]

template<class T , class U >
constexpr bool tl::operator== ( const U & lhs,
const optional< T > & rhs )
inlineconstexpr

Definition at line 1697 of file tl-optional.hpp.

◆ operator!=() [4/5]

template<class T , class U >
constexpr bool tl::operator!= ( const optional< T > & lhs,
const U & rhs )
inlineconstexpr

Definition at line 1703 of file tl-optional.hpp.

◆ operator!=() [5/5]

template<class T , class U >
constexpr bool tl::operator!= ( const U & lhs,
const optional< T > & rhs )
inlineconstexpr

Definition at line 1709 of file tl-optional.hpp.

◆ operator<() [4/5]

template<class T , class U >
constexpr bool tl::operator< ( const optional< T > & lhs,
const U & rhs )
inlineconstexpr

Definition at line 1714 of file tl-optional.hpp.

◆ operator<() [5/5]

template<class T , class U >
constexpr bool tl::operator< ( const U & lhs,
const optional< T > & rhs )
inlineconstexpr

Definition at line 1720 of file tl-optional.hpp.

◆ operator<=() [4/5]

template<class T , class U >
constexpr bool tl::operator<= ( const optional< T > & lhs,
const U & rhs )
inlineconstexpr

Definition at line 1726 of file tl-optional.hpp.

◆ operator<=() [5/5]

template<class T , class U >
constexpr bool tl::operator<= ( const U & lhs,
const optional< T > & rhs )
inlineconstexpr

Definition at line 1732 of file tl-optional.hpp.

◆ operator>() [4/5]

template<class T , class U >
constexpr bool tl::operator> ( const optional< T > & lhs,
const U & rhs )
inlineconstexpr

Definition at line 1739 of file tl-optional.hpp.

◆ operator>() [5/5]

template<class T , class U >
constexpr bool tl::operator> ( const U & lhs,
const optional< T > & rhs )
inlineconstexpr

Definition at line 1745 of file tl-optional.hpp.

◆ operator>=() [4/5]

template<class T , class U >
constexpr bool tl::operator>= ( const optional< T > & lhs,
const U & rhs )
inlineconstexpr

Definition at line 1751 of file tl-optional.hpp.

◆ operator>=() [5/5]

template<class T , class U >
constexpr bool tl::operator>= ( const U & lhs,
const optional< T > & rhs )
inlineconstexpr

Definition at line 1757 of file tl-optional.hpp.

◆ swap()

template<class T , detail::enable_if_t< std::is_move_constructible< T >::value > * = nullptr, detail::enable_if_t< detail::is_swappable< T >::value > * = nullptr>
void tl::swap ( optional< T > & lhs,
optional< T > & rhs )
noexcept

Definition at line 1766 of file tl-optional.hpp.

◆ make_optional() [1/3]

template<class T = detail::i_am_secret, class U , class Ret = detail::conditional_t<std::is_same<T, detail::i_am_secret>::value, detail::decay_t<U>, T>>
constexpr optional< Ret > tl::make_optional ( U && v)
inlineconstexpr

Definition at line 1783 of file tl-optional.hpp.

◆ make_optional() [2/3]

template<class T , class... Args>
constexpr optional< T > tl::make_optional ( Args &&... args)
inlineconstexpr

Definition at line 1790 of file tl-optional.hpp.

◆ make_optional() [3/3]

template<class T , class U , class... Args>
constexpr optional< T > tl::make_optional ( std::initializer_list< U > il,
Args &&... args )
inlineconstexpr

Definition at line 1796 of file tl-optional.hpp.

Variable Documentation

◆ in_place

constexpr in_place_t tl::in_place {}
staticconstexpr

A tag to tell optional to construct its value in-place.

Definition at line 124 of file tl-optional.hpp.

◆ nullopt

constexpr nullopt_t tl::nullopt
staticconstexpr
Initial value:
{ nullopt_t::do_not_use{},

Represents an empty optional.

Definition at line 794 of file tl-optional.hpp.