Skip to content

Commit ab0b358

Browse files
committed
Add files
1 parent 242ddc3 commit ab0b358

5 files changed

Lines changed: 6 additions & 4 deletions

File tree

docs/spec/make_proxy_ref.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ template <facade F, class T>
1212
proxy<F> make_proxy_ref(T& value) noexcept;
1313
```
1414
15-
Creates a `proxy<F>` object containing a value `p` of type `observer-ptr<T>`, where `*p` is direct-non-list-initialized with `&value`. If [`proxiable_target<T, F>`](proxiable_target.md) is `false`, the program is ill-formed and diagnostic messages are generated.
15+
Creates a `proxy<F>` object containing a value `p` of type `observer-ptr<T>`, where `*p` is direct-non-list-initialized with `std::addressof(value)`. If [`proxiable_target<T, F>`](proxiable_target.md) is `false`, the program is ill-formed and diagnostic messages are generated.
1616
1717
## Return Value
1818

docs/spec/proxiable_target.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
88
```cpp
99
template <class T, class F>
10-
concept proxiable_target = proxiable<observer-ptr<T>, F>;
10+
concept proxiable_target = proxiable<observer-ptr<T>, observer_facade<F>>;
1111
```
1212
1313
See [`make_proxy_ref`](make_proxy_ref.md) for the definition of the exposition-only class template *observer-ptr*.

docs/spec/proxy_view.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ template <facade F>
1313
using proxy_view = proxy<observer_facade<F>>;
1414
```
1515

16-
`proxy_view<F>` is a non-owning, trivially copyable, trivially relocatable view of an object that models [`proxiable_target<T, observer_facade<F>>`](proxiable_target.md). It behaves like a `proxy<F>` except that it never owns the lifetime of the underlying object.
16+
`proxy_view<F>` is a non-owning, trivially copyable, trivially relocatable view of an object that models [`proxiable_target<T, F>`](proxiable_target.md). It behaves like a `proxy<F>` except that it never owns the lifetime of the underlying object.
1717

1818
`observer_facade<F>` adapts an existing [facade](facade.md) `F` for this non-owning use. The adaptation preserves only those parts of `F` that remain semantically valid when the storage is reduced to a single pointer and modifies substitution conversions so that view-ness is preserved (substitution that would have produced an owning `proxy<G>` instead produces a `proxy_view<G>`).
1919

include/proxy/v4/proxy.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1784,7 +1784,8 @@ concept inplace_proxiable_target = proxiable<details::inplace_ptr<T>, F>;
17841784

17851785
template <class T, class F>
17861786
concept proxiable_target =
1787-
proxiable<details::observer_ptr<T&, const T&, T&&, const T&&>, F>;
1787+
proxiable<details::observer_ptr<T&, const T&, T&&, const T&&>,
1788+
observer_facade<F>>;
17881789

17891790
template <class T>
17901791
requires(is_bitwise_trivially_relocatable_v<T>)

tests/proxy_creation_tests.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ struct TestWeakSharedStringable : pro::facade_builder //
174174

175175
static_assert(pro::proxiable<int*, TestSharedStringable>);
176176
static_assert(!pro::proxiable<int*, TestWeakSharedStringable>);
177+
static_assert(pro::proxiable_target<int, TestWeakSharedStringable>);
177178

178179
} // namespace proxy_creation_tests_details
179180

0 commit comments

Comments
 (0)