GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • cpprefjp - C++日本語リファレンス
  • GitHub Project

This view

  • Original page
  • New address

GeezerVison is showing cpprefjp.github.io — std::dereferenceable - cpprefjp C++日本語リファレンス

  1. リファレンス
  2. iterator
  3. dereferenceable

最終更新日時: 2026年02月08日 19時05分51秒 (JST)
Raclamusi が更新

履歴 編集

concept
<iterator>

std::dereferenceable(C++20)

namespace std {
  // 参照修飾を付加する
  template<class T>
  using with-reference = T&;

  // 参照修飾可能(例えばvoidはこれを満たさない)
  template<class T>
  concept can-reference = requires { 
    typename with-reference<T>;
  };

  // 間接参照可能であり、何らかの結果を返す
  template<class T>
  concept dereferenceable = requires(T& t) {
    { *t } -> can-reference;  // 等しさを保持することを要求しない
  };
}

概要

これらの説明専用エンティティは、任意の型がoperator*による間接参照が可能であり、何かしらの結果を返すことを表すための最低限のコンセプトとそのためのエイリアステンプレートである。

これらのものは<iterator>ヘッダ内の他のクラスやコンセプトの定義および説明に使用されるものであり、実際に使用可能ではない。

参照

  • P0896R4 The One Ranges Proposal (was Merging the Ranges TS)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.