名前空間
変種
操作

実験的なライブラリヘッダー <experimental/optional>

From cppreference.com
< cpp‎ | header‎ | experimental
 
 
標準ライブラリヘッダー
 
実験的なライブラリヘッダー
実行 P2300
<experimental/execution>
ファイルシステム TS
<experimental/filesystem>
並列処理 TS (v1, v2)
experimental/algorithm
experimental/execution_policy
experimental/exception_list
experimental/numeric
<experimental/simd>
experimental/task_block
ライブラリの基礎 TS (v1, v2, v3)
experimental/algorithm
<experimental/any>
experimental/array
experimental/chrono
experimental/deque
experimental/forward_list
<experimental/functional>
experimental/future
experimental/iterator
experimental/list
experimental/map
experimental/memory
<experimental/memory_resource>
experimental/numeric
<experimental/optional>
experimental/propagate_const
experimental/random
experimental/ratio
experimental/regex
experimental/scope
experimental/set
experimental/source_location
experimental/string
<experimental/string_view>
experimental/system_error
experimental/tuple
experimental/type_traits
experimental/unordered_map
experimental/unordered_set
experimental/utility
experimental/vector

並行処理 TS
experimental/atomic
experimental/barrier
experimental/future
experimental/latch
Ranges TS
コルーチンTS
experimental/coroutine
ネットワーキングTS
experimental/buffer
experimental/executor
experimental/internet
experimental/io_context
<experimental/net>
experimental/netfwd
experimental/socket
experimental/timer
リフレクションTS
<experimental/reflect>
 

このヘッダーは、Library Fundamentals TS (v1, v2) の一部です。

目次

[編集] クラス

名前 説明
(Library Fundamentals TS)
オブジェクトを保持しているかもしれないし、していないかもしれないラッパー
(クラステンプレート) [編集]
(Library Fundamentals TS)
値を保持していない optional へのチェック付きアクセスを示す例外
(クラス) [編集]
(Library Fundamentals TS)
optional型のインプレース構築のための曖昧解消タグ型
(クラス) [編集]
std::hash アルゴリズムを特殊化します。
(クラステンプレート特殊化) [編集]
(Library Fundamentals TS)
未初期化状態の optional 型のインジケーター
(クラス) [編集]

[編集] 関数

比較
optional オブジェクトを比較する
(関数テンプレート) [編集]
特殊化されたアルゴリズム
std::swap アルゴリズムを特殊化する
(関数) [編集]
optional オブジェクトを作成する
(関数テンプレート) [編集]
ハッシュサポート

[編集] 概要

namespace std {
  namespace experimental {
  inline namespace fundamentals_v1 {
 
    // 5.4, optional for object types
    template <class T> class optional;
 
    // 5.5, In-place construction
    struct in_place_t{};
    constexpr in_place_t in_place{};
 
    // 5.6, Disengaged state indicator
    struct nullopt_t{see below};
    constexpr nullopt_t nullopt(unspecified);
 
    // 5.7, Class bad_optional_access
    class bad_optional_access;
 
    // 5.8, Relational operators
    template <class T>
      constexpr bool operator==(const optional<T>&, const optional<T>&);
    template <class T>
      constexpr bool operator!=(const optional<T>&, const optional<T>&);
    template <class T>
      constexpr bool operator<(const optional<T>&, const optional<T>&);
    template <class T>
      constexpr bool operator>(const optional<T>&, const optional<T>&);
    template <class T>
      constexpr bool operator<=(const optional<T>&, const optional<T>&);
    template <class T>
      constexpr bool operator>=(const optional<T>&, const optional<T>&);
 
    // 5.9, Comparison with nullopt
    template <class T> constexpr bool operator==(const optional<T>&, 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>&) noexcept;
    template <class T> constexpr bool operator<(const optional<T>&, 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>&) noexcept;
    template <class T> constexpr bool operator>(const optional<T>&, 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>&) noexcept;
 
    // 5.10, Comparison with T
    template <class T> constexpr bool operator==(const optional<T>&, const T&);
    template <class T> constexpr bool operator==(const T&, const optional<T>&);
    template <class T> constexpr bool operator!=(const optional<T>&, const T&);
    template <class T> constexpr bool operator!=(const T&, const optional<T>&);
    template <class T> constexpr bool operator<(const optional<T>&, const T&);
    template <class T> constexpr bool operator<(const T&, const optional<T>&);
    template <class T> constexpr bool operator<=(const optional<T>&, const T&);
    template <class T> constexpr bool operator<=(const T&, const optional<T>&);
    template <class T> constexpr bool operator>(const optional<T>&, const T&);
    template <class T> constexpr bool operator>(const T&, const optional<T>&);
    template <class T> constexpr bool operator>=(const optional<T>&, const T&);
    template <class T> constexpr bool operator>=(const T&, const optional<T>&);
 
    // 5.11, Specialized algorithms
    template <class T> void swap(optional<T>&, optional<T>&) noexcept(see below);
    template <class T> constexpr optional<see below> make_optional(T&&);
 
  } // namespace fundamentals_v1
  } // namespace experimental
 
  // 5.12, Hash support
  template <class T> struct hash;
  template <class T> struct hash<experimental::optional<T>>;
 
} // namespace std
English 日本語 中文(简体) 中文(繁體)