diff --git a/docs/spec/explicit_conversion_dispatch/accessor.md b/docs/spec/explicit_conversion_dispatch/accessor.md index 7a22671..9801337 100644 --- a/docs/spec/explicit_conversion_dispatch/accessor.md +++ b/docs/spec/explicit_conversion_dispatch/accessor.md @@ -25,4 +25,4 @@ struct accessor
{ `(2)` When `sizeof...(Os)` is greater than `1`, and `accessor
...` are default-constructible, inherits all `accessor
...` types and `using` their `operator return-type-of >(*this))`.
+`(3)` When `sizeof...(Os)` is `1` and the only type `O` in `Os` is `T() cv ref noex`, provides an explicit `operator T()` with the same *cv ref noex* specifiers. `accessor::operator T()` is equivalent to `return invoke >(*this))`.
diff --git a/docs/spec/implicit_conversion_dispatch/accessor.md b/docs/spec/implicit_conversion_dispatch/accessor.md
index 15cadf3..a1efc20 100644
--- a/docs/spec/implicit_conversion_dispatch/accessor.md
+++ b/docs/spec/implicit_conversion_dispatch/accessor.md
@@ -25,4 +25,4 @@ struct accessor {
`(2)` When `sizeof...(Os)` is greater than `1`, and `accessor ...` are default-constructible, inherits all `accessor ...` types and `using` their `operator return-type-of >(*this))`.
+`(3)` When `sizeof...(Os)` is `1` and the only type `O` in `Os` is `T() cv ref noex`, provides an implicit `operator T()` with the same *cv ref noex* specifiers. `accessor::operator T()` is equivalent to `return invoke >(*this))`.
diff --git a/docs/spec/operator_dispatch/README.md b/docs/spec/operator_dispatch/README.md
index ab2cbc0..f2d2b9f 100644
--- a/docs/spec/operator_dispatch/README.md
+++ b/docs/spec/operator_dispatch/README.md
@@ -54,7 +54,7 @@ Let `self` be the operand of [`proxy`](../proxy/README.md), and `other` and `oth
| `operator_dispatch<"!", false>` | `!self` |
| `operator_dispatch<"&&", false>` | `self && other` |
| `operator_dispatch<"||", false>` | `self || other` |
-| `operator_dispatch<"~", false>` | `!self` |
+| `operator_dispatch<"~", false>` | `~self` |
| `operator_dispatch<"&", false>` | `&self`, `self & other` |
| `operator_dispatch<"|", false>` | `self | other` |
| `operator_dispatch<"^", false>` | `self ^ other` |
diff --git a/docs/spec/operator_dispatch/accessor.md b/docs/spec/operator_dispatch/accessor.md
index c4ea650..2362ede 100644
--- a/docs/spec/operator_dispatch/accessor.md
+++ b/docs/spec/operator_dispatch/accessor.md
@@ -29,56 +29,78 @@ When `Rhs` is `false`, the other specializations are defined as follows, where `
### Regular SOPs
-When `Sign` is one of `"+"`, `"-"`, `"*"`, `"/"`, `"%"`, `"++"`, `"--"`, `"=="`, `"!="`, `">"`, `"<"`, `">="`, `"<="`, `"<=>"`, `"&&"`, `"||"`, `"&"`, `"|"`, `"^"`, `"<<"`, `">>"`, `","`, `"->*"`, `"()"`, `"[]"`,
+When `Sign` is one of `"+"`, `"-"`, `"*"`, `"/"`, `"%"`, `"=="`, `"!="`, `">"`, `"<"`, `">="`, `"<="`, `"<=>"`, `"&&"`, `"||"`, `"&"`, `"|"`, `"^"`, `"<<"`, `">>"`, `","`, `"->*"`, `"()"`, `"[]"`,
```cpp
// (3)
template {
R operator sop (Args... args) cv ref noex;
-}
+};
```
`(3)` Provides an `operator sop(Args...)` with the same *cv ref noex* specifiers as of the overload type. `accessor::operator sop(Args...)` is equivalent to `return invoke >(*this), std::forward {
R operator sop () cv ref noex;
-}
+};
```
`(4)` Provides an `operator sop()` with the same *cv ref noex* specifiers as of the overload type. `accessor::operator sop()` is equivalent to `return invoke >(*this))`.
+### `"++"` and `"--"`
+
+When `Sign` is either `"++"` or `"--"`,
+
+```cpp
+// (5)
+template {
+ /* see below */ operator sop () cv ref noex;
+};
+
+// (6)
+template {
+ R operator sop (int) cv ref noex;
+};
+```
+
+`(5)` Provides a prefix `operator sop()` with the same *cv ref noex* specifiers as of the overload type. `accessor::operator sop()` calls `invoke >(*this))` and returns `static_cast >(*this)`.
+
+`(6)` Provides a postfix `operator sop(int)` with the same *cv ref noex* specifiers as of the overload type. `accessor::operator sop(int)` is equivalent to `return invoke >(*this), 0)`.
+
### Assignment SOPs
When `Sign` is one of `"+="`, `"-="`, `"*="`, `"/="`, `"%="`, `"&="`, `"|="`, `"^="`, `"<<="`, `">>="`,
```cpp
-// (5)
+// (7)
template {
/* see below */ operator sop (Arg arg) cv ref noex;
-}
+};
```
-`(4)` Provides an `operator sop(Arg)` with the same *cv ref noex* specifiers as of the overload type. `accessor::operator sop(Arg)` calls `invoke >(*this), std::forward >(*this)`.
+`(7)` Provides an `operator sop(Arg)` with the same *cv ref noex* specifiers as of the overload type. `accessor::operator sop(Arg)` calls `invoke >(*this), std::forward >(*this)`.
## Right-Hand-Side Operand Specializations
```cpp
-// (6)
+// (8)
template : accessor ... {};
```
-`(6)` When `sizeof...(Os)` is greater than `1`, and `accessor ...` are default-constructible types, inherits all `accessor ...` types.
+`(8)` When `sizeof...(Os)` is greater than `1`, and `accessor ...` are default-constructible types, inherits all `accessor ...` types.
When `Rhs` is `true`, the other specializations are defined as follows, where `sizeof...(Os)` is `1` and the only type `O` qualified with `cv ref noex`:
@@ -87,25 +109,25 @@ When `Rhs` is `true`, the other specializations are defined as follows, where `s
When `Sign` is one of `"+"`, `"-"`, `"*"`, `"/"`, `"%"`, `"=="`, `"!="`, `">"`, `"<"`, `">="`, `"<="`, `"<=>"`, `"&&"`, `"||"`, `"&"`, `"|"`, `"^"`, `"<<"`, `">>"`, `","`, `"->*"`,
```cpp
-// (7)
+// (9)
template {
friend R operator sop (Arg arg, P cv self) noex;
-}
+};
```
-`(7)` Provides a `friend operator sop(Arg arg, P cv self)` with the same *noex* specifiers as of the overload type. `accessor::operator sop(Arg arg, P cv self)` is equivalent to `return invoke >(self), std::forward >(self), std::forward {
- friend /* see below */ operator sop (Arg arg, P cv self) noex;
-}
+struct accessor {
+ friend Arg& operator sop (Arg& arg, P cv self) noex;
+};
```
-`(8)` Provides a `friend operator sop(Arg arg, P cv self)` with the same *noex* specifiers as of the overload type. `accessor::operator sop(Arg arg, P cv self)` calls `invoke >(self), std::forward >(self)`.
+`(10)` Provides a `friend operator sop(Arg& arg, P cv self)` with the same *noex* specifiers as of the overload type. `accessor::operator sop(Arg& arg, P cv self)` calls `invoke >(self), arg)` and returns `arg`.