From 5f8fea3398580638ca88fe270ac92b789e6e48bc Mon Sep 17 00:00:00 2001 From: Akira Takahashi Date: Wed, 26 Apr 2023 16:29:59 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=AF=E3=83=A9=E3=82=B9=E3=81=AE=E9=9B=9B?= =?UTF-8?q?=E5=BD=A2=E3=83=9A=E3=83=BC=E3=82=B8=20:=20Hidden=20Friends?= =?UTF-8?q?=E3=81=AE=E8=A8=98=E8=BC=89=E4=BE=8B=E3=82=92=E8=BF=BD=E5=8A=A0?= =?UTF-8?q?=20#1142?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- start_editing/class_template_page.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/start_editing/class_template_page.md b/start_editing/class_template_page.md index e6c268aa80..525e7d8eb8 100644 --- a/start_editing/class_template_page.md +++ b/start_editing/class_template_page.md @@ -102,7 +102,7 @@ namespace std { (比較演算子がデフォルト定義され、個別ページを作らない場合の記述例。オペランドの組み合わせ数が多い場合には、個別ページを作ることを推奨する) | 名前 | 説明 | 対応バージョン | -|-----|-----|-----| +|------|------|----------------| | `bool operator==(const X&, const X&) = default;` | 等値比較 | | | `bool operator!=(const X&, const X&);` | 非等値比較 (`==`により使用可能) | | | `strong_ordering operator<=>(const X&, const X&) = default;` | 三方比較 | | @@ -112,6 +112,15 @@ namespace std { | `bool operator>=(const X&, const X&);` | 左辺が右辺以上かを判定する (`<=>`により使用可能) | | +## 非メンバ(*Hidden friends*)関数 + +(`friend`付きメンバ関数はこの見出し以下で記載する。[`counted_iterator`](/reference/iterator/counted_iterator.md)を例として参照) + +| 名前 | 説明 | 対応バージョン | +|------|------|----------------| +| `swap` | 2つのオブジェクトを入れ替える | | + + ## 例 ```cpp example // (ここには、クラスを解説するための、サンプルコードを記述します。)