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

Namespaces

namespace  detail
 \exclude

Classes

class  monostate
 Used to represent an optional with no data; essentially a bool. More...
struct  in_place_t
 A tag type to tell optional to construct its value in-place. More...
class  optional
struct  nullopt_t
 A tag type to represent an empty optional. More...
class  bad_optional_access
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>
bool tl::operator==(const optional< T > &lhs,
const optional< U > &rhs )
inlineconstexpr

Compares two optional objects.

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

◆ operator!=() [1/5]

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

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

◆ operator<() [1/5]

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

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

◆ operator>() [1/5]

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

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

◆ operator<=() [1/5]

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

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

◆ operator>=() [1/5]

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

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

◆ operator==() [2/5]

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

Compares an optional to a nullopt.

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

◆ operator==() [3/5]

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

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

◆ operator!=() [2/5]

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

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

◆ operator!=() [3/5]

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

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

◆ operator<() [2/5]

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

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

◆ operator<() [3/5]

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

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

◆ operator<=() [2/5]

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

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

◆ operator<=() [3/5]

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

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

◆ operator>() [2/5]

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

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

◆ operator>() [3/5]

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

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

◆ operator>=() [2/5]

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

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

◆ operator>=() [3/5]

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

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

◆ operator==() [4/5]

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

Compares the optional with a value.

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

◆ operator==() [5/5]

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

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

◆ operator!=() [4/5]

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

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

◆ operator!=() [5/5]

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

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

◆ operator<() [4/5]

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

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

◆ operator<() [5/5]

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

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

◆ operator<=() [4/5]

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

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

◆ operator<=() [5/5]

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

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

◆ operator>() [4/5]

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

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

◆ operator>() [5/5]

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

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

◆ operator>=() [4/5]

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

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

◆ operator>=() [5/5]

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

Definition at line 1756 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 1765 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>>
optional< Ret > tl::make_optional(U &&v)
inlineconstexpr

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

◆ make_optional() [2/3]

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

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

◆ make_optional() [3/3]

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

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

Variable Documentation

◆ in_place

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

nullopt_t tl::nullopt
staticconstexpr
Initial value:

Represents an empty optional.

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