Template Class optional< T & >

Page Contents

Class Documentation

template<class T>
class c10::optional<T&>

Public Functions

constexpr optional() noexcept
constexpr optional(nullopt_t) noexcept
template<typename U = T>
constexpr optional(U &u) noexcept
template<typename U = T>
optional(U&&) = delete
constexpr optional(const optional &rhs) noexcept
constexpr optional(in_place_t, T &v) noexcept
optional(in_place_t, T&&) = delete
~optional() = default
optional &operator=(nullopt_t) noexcept
template<typename U>
auto operator=(U &&rhs) noexcept -> typename std::enable_if<std::is_same<typename std::decay<U>::type, optional<T&>>::value, optional&>::type
template<typename U>
auto operator=(U &&rhs) noexcept -> typename std::enable_if<!std::is_same<typename std::decay<U>::type, optional<T&>>::value, optional&>::type = delete
void emplace(T &v) noexcept
void emplace(T&&) = delete
void swap(optional<T&> &rhs) noexcept
constexpr T *operator->() const
constexpr T &operator*() const
constexpr T &value() const
constexpr operator bool() const noexcept
constexpr bool has_value() const noexcept
template<class V>
constexpr std::decay<T>::type value_or(V &&v) const
void reset() noexcept


Access comprehensive developer documentation for PyTorch

View Docs


Get in-depth tutorials for beginners and advanced developers

View Tutorials


Find development resources and get your questions answered

View Resources