From ba0aa501ceedb194a6420426e3618d98b93770e1 Mon Sep 17 00:00:00 2001 From: Mingxin Wang Date: Sun, 15 Dec 2024 10:55:45 +0800 Subject: [PATCH] Fix doc --- docs/proxy/indirection.md | 20 ++++++++++---------- docs/specifications.md | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/proxy/indirection.md b/docs/proxy/indirection.md index 89926a3..1b487b5 100644 --- a/docs/proxy/indirection.md +++ b/docs/proxy/indirection.md @@ -1,30 +1,29 @@ # `proxy::operator->`, `proxy::operator*` -The definitions of `proxy::operator->` and `proxy::operator*` make use of the following exposition-only constant and type alias: +The definitions of `proxy::operator->` and `proxy::operator*` make use of the following exposition-only constant: ```cpp static constexpr bool has-indirection = see below; // exposition only -using indirect-accessor = see below; // exposition only ``` As per [`facade`](../facade.md), `typename F::convention_types` shall be a [tuple-like](https://en.cppreference.com/w/cpp/utility/tuple/tuple-like) type containing any number of distinct types `Cs`. Let `Cs2` be the types in `Cs` where each type `C` meets the [*ProAccessible* requirements](../ProAccessible.md) of `F` and `C::is_direct` is `false`. *has-indirection* is `true` if `Cs2` contains at least one type; otherwise, it is `false`. *indirect-accessor* is a non-copyable type that inherits from every type in `Cs2`. ```cpp // (1) -indirect-accessor* operator->() noexcept requires(has-indirection); -const indirect-accessor* operator->() const noexcept requires(has-indirection); +proxy_indirect_accessor* operator->() noexcept requires(has-indirection); +const proxy_indirect_accessor* operator->() const noexcept requires(has-indirection); // (2) -indirect-accessor& operator*() & noexcept requires(has-indirection); -const indirect-accessor& operator*() const& noexcept requires(has-indirection); -indirect-accessor&& operator*() && noexcept requires(has-indirection); -const indirect-accessor&& operator*() const&& noexcept requires(has-indirection); +proxy_indirect_accessor& operator*() & noexcept requires(has-indirection); +const proxy_indirect_accessor& operator*() const& noexcept requires(has-indirection); +proxy_indirect_accessor&& operator*() && noexcept requires(has-indirection); +const proxy_indirect_accessor&& operator*() const&& noexcept requires(has-indirection); ``` These operators access the accessors of the indirect conventions, as if dereferencing the contained value. -- `(1)` Returns a pointer to the *indirect-accessor*. -- `(2)` Returns a reference to the *indirect-accessor*. +- `(1)` Returns a pointer to the `proxy_indirect_accessor`. +- `(2)` Returns a reference to the `proxy_indirect_accessor`. The behavior is undefined if `*this` does not contain a value. @@ -68,3 +67,4 @@ int main() { - [function template `access_proxy`](../access_proxy.md) - [function template `proxy_invoke`](../proxy_invoke.md) +- [class template `proxy_indirect_accessor`](../proxy_indirect_accessor.md) diff --git a/docs/specifications.md b/docs/specifications.md index 870f8b6..46c7ab5 100644 --- a/docs/specifications.md +++ b/docs/specifications.md @@ -21,7 +21,7 @@ This document provides the API specifications for the C++ library Proxy (version | [`operator_dispatch`](operator_dispatch.md) | Dispatch type for operator expressions with accessibility | | [`explicit_conversion_dispatch`
`conversion_dispatch`](explicit_conversion_dispatch.md) | Dispatch type for explicit conversion expressions with accessibility | | [`implicit_conversion_dispatch`](implicit_conversion_dispatch.md) | Dispatch type for implicit conversion expressions with accessibility | -| [`proxy_indirect_accessor`](proxy_indirect_accessor.md) | Provides indirection accessibility for `proxy` types | +| [`proxy_indirect_accessor`](proxy_indirect_accessor.md) | Provides indirection accessibility for `proxy` | ## Functions