Shortcuts

Template Class OptionalArrayRef

Page Contents

Class Documentation

template<typename T>
class OptionalArrayRef

Public Functions

constexpr OptionalArrayRef() noexcept = default
inline constexpr OptionalArrayRef(std::nullopt_t) noexcept
OptionalArrayRef(const OptionalArrayRef &other) = default
OptionalArrayRef(OptionalArrayRef &&other) noexcept = default
inline constexpr OptionalArrayRef(const std::optional<ArrayRef<T>> &other) noexcept
inline constexpr OptionalArrayRef(std::optional<ArrayRef<T>> &&other) noexcept
inline constexpr OptionalArrayRef(const T &value) noexcept
template<typename U = ArrayRef<T>, std::enable_if_t<!std::is_same_v<std::decay_t<U>, OptionalArrayRef> && !std::is_same_v<std::decay_t<U>, std::in_place_t> && std::is_constructible_v<ArrayRef<T>, U&&> && std::is_convertible_v<U&&, ArrayRef<T>> && !std::is_convertible_v<U&&, T>, bool> = false>
inline constexpr OptionalArrayRef(U &&value) noexcept(std::is_nothrow_constructible_v<ArrayRef<T>, U&&>)
template<typename U = ArrayRef<T>, std::enable_if_t<!std::is_same_v<std::decay_t<U>, OptionalArrayRef> && !std::is_same_v<std::decay_t<U>, std::in_place_t> && std::is_constructible_v<ArrayRef<T>, U&&> && !std::is_convertible_v<U&&, ArrayRef<T>>, bool> = false>
inline explicit constexpr OptionalArrayRef(U &&value) noexcept(std::is_nothrow_constructible_v<ArrayRef<T>, U&&>)
template<typename ...Args>
inline explicit constexpr OptionalArrayRef(std::in_place_t ip, Args&&... args) noexcept
template<typename U, typename ...Args>
inline explicit constexpr OptionalArrayRef(std::in_place_t ip, std::initializer_list<U> il, Args&&... args)
inline constexpr OptionalArrayRef(const std::initializer_list<T> &Vec)
~OptionalArrayRef() = default
inline constexpr OptionalArrayRef &operator=(std::nullopt_t) noexcept
OptionalArrayRef &operator=(const OptionalArrayRef &other) = default
OptionalArrayRef &operator=(OptionalArrayRef &&other) noexcept = default
inline constexpr OptionalArrayRef &operator=(const std::optional<ArrayRef<T>> &other) noexcept
inline constexpr OptionalArrayRef &operator=(std::optional<ArrayRef<T>> &&other) noexcept
template<typename U = ArrayRef<T>, typename = std::enable_if_t<!std::is_same_v<std::decay_t<U>, OptionalArrayRef> && std::is_constructible_v<ArrayRef<T>, U&&> && std::is_assignable_v<ArrayRef<T>&, U&&>>>
inline constexpr OptionalArrayRef &operator=(U &&value) noexcept(std::is_nothrow_constructible_v<ArrayRef<T>, U&&> && std::is_nothrow_assignable_v<ArrayRef<T>&, U&&>)
inline constexpr ArrayRef<T> *operator->() noexcept
inline constexpr const ArrayRef<T> *operator->() const noexcept
inline constexpr ArrayRef<T> &operator*() & noexcept
inline constexpr const ArrayRef<T> &operator*() const & noexcept
inline constexpr ArrayRef<T> &&operator*() && noexcept
inline constexpr const ArrayRef<T> &&operator*() const && noexcept
inline explicit constexpr operator bool() const noexcept
inline constexpr bool has_value() const noexcept
inline constexpr ArrayRef<T> &value() &
inline constexpr const ArrayRef<T> &value() const &
inline constexpr ArrayRef<T> &&value() &&
inline constexpr const ArrayRef<T> &&value() const &&
template<typename U>
inline constexpr std::enable_if_t<std::is_convertible_v<U&&, ArrayRef<T>>, ArrayRef<T>> value_or(U &&default_value) const &
template<typename U>
inline constexpr std::enable_if_t<std::is_convertible_v<U&&, ArrayRef<T>>, ArrayRef<T>> value_or(U &&default_value) &&
inline constexpr void swap(OptionalArrayRef &other) noexcept
inline constexpr void reset() noexcept
template<typename ...Args>
inline constexpr std::enable_if_t<std::is_constructible_v<ArrayRef<T>, Args&&...>, ArrayRef<T>&> emplace(Args&&... args) noexcept(std::is_nothrow_constructible_v<ArrayRef<T>, Args&&...>)
template<typename U, typename ...Args>
inline constexpr ArrayRef<T> &emplace(std::initializer_list<U> il, Args&&... args) noexcept

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources