Skip to content

Commit 7ff267b

Browse files
committed
Rename to make_proxy_observed
1 parent cdebb01 commit 7ff267b

8 files changed

Lines changed: 14 additions & 14 deletions

File tree

docs/spec/.pages

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ nav:
3232
- allocate_proxy_shared: allocate_proxy_shared.md
3333
- allocate_proxy: allocate_proxy.md
3434
- make_proxy_inplace: make_proxy_inplace.md
35-
- make_proxy_ref: make_proxy_ref.md
35+
- make_proxy_observed: make_proxy_observed.md
3636
- make_proxy_shared: make_proxy_shared.md
3737
- make_proxy_view: make_proxy_view.md
3838
- make_proxy: make_proxy.md

docs/spec/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ This document provides the API specifications for the C++ library Proxy (version
5252
| [`allocate_proxy_shared`](allocate_proxy_shared.md) | Creates a `proxy` object with shared ownership using an allocator |
5353
| [`allocate_proxy`](allocate_proxy.md) | Creates a `proxy` object with an allocator |
5454
| [`make_proxy_inplace`](make_proxy_inplace.md) | Creates a `proxy` object with strong no-allocation guarantee |
55-
| [`make_proxy_ref`](make_proxy_ref.md) | Creates a `proxy` object with no ownership |
55+
| [`make_proxy_observed`](make_proxy_observed.md) | Creates a `proxy` object with no ownership |
5656
| [`make_proxy_shared`](make_proxy_shared.md) | Creates a `proxy` object with shared ownership |
5757
| [`make_proxy_view`](make_proxy_view.md) | Creates a `proxy_view` object |
5858
| [`make_proxy`](make_proxy.md) | Creates a `proxy` object potentially with heap allocation |
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# Function template `make_proxy_ref`
1+
# Function template `make_proxy_observed`
22

33
> Header: `proxy.h`
44
> Module: `proxy`
55
> Namespace: `pro::inline v4`
66
> Since: 4.1.0
77
8-
The definition of `make_proxy_ref` makes use of an exposition-only class template *observer-ptr*. `observer-ptr<T>` contains a raw pointer to an object of type `T`, and provides `operator*` for access with the same qualifiers.
8+
The definition of `make_proxy_observed` makes use of an exposition-only class template *observer-ptr*. `observer-ptr<T>` contains a raw pointer to an object of type `T`, and provides `operator*` for access with the same qualifiers.
99

1010
```cpp
1111
template <facade F, class T>
12-
proxy<F> make_proxy_ref(T& value) noexcept;
12+
proxy<F> make_proxy_observed(T& value) noexcept;
1313
```
1414
1515
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.
@@ -32,7 +32,7 @@ struct Printable : pro::facade_builder //
3232
3333
int main() {
3434
int val = 123;
35-
pro::proxy<Printable> p = pro::make_proxy_ref<Printable>(val);
35+
pro::proxy<Printable> p = pro::make_proxy_observed<Printable>(val);
3636
3737
// Prints "123"
3838
std::cout << *p << "\n";

docs/spec/make_proxy_view.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ template <facade F, class T>
1010
proxy_view<F> make_proxy_view(T& value) noexcept;
1111
```
1212
13-
Equivalent to `return make_proxy_ref<observer_facade<F>>(value)`.
13+
Equivalent to `return make_proxy_observed<observer_facade<F>>(value)`.
1414
1515
## Return Value
1616

docs/spec/proxiable_target.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ template <class T, class F>
1010
concept proxiable_target = proxiable<observer-ptr<T>, observer_facade<F>>;
1111
```
1212
13-
See [`make_proxy_ref`](make_proxy_ref.md) for the definition of the exposition-only class template *observer-ptr*.
13+
See [`make_proxy_observed`](make_proxy_observed.md) for the definition of the exposition-only class template *observer-ptr*.
1414
1515
## Example
1616

include/proxy/v4/proxy.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1819,13 +1819,13 @@ constexpr proxy<F> make_proxy_inplace(T&& value) noexcept(
18191819
}
18201820

18211821
template <facade F, class T>
1822-
constexpr proxy<F> make_proxy_ref(T& value) noexcept {
1822+
constexpr proxy<F> make_proxy_observed(T& value) noexcept {
18231823
return proxy<F>{details::observer_ptr<T&, const T&, T&&, const T&&>{value}};
18241824
}
18251825

18261826
template <facade F, class T>
18271827
constexpr proxy_view<F> make_proxy_view(T& value) noexcept {
1828-
return make_proxy_ref<observer_facade<F>>(value);
1828+
return make_proxy_observed<observer_facade<F>>(value);
18291829
}
18301830

18311831
#if __STDC_HOSTED__

include/proxy/v4/proxy.ixx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ using v4::is_bitwise_trivially_relocatable;
2222
using v4::is_bitwise_trivially_relocatable_v;
2323
using v4::make_proxy;
2424
using v4::make_proxy_inplace;
25-
using v4::make_proxy_ref;
25+
using v4::make_proxy_observed;
2626
using v4::make_proxy_shared;
2727
using v4::make_proxy_view;
2828
using v4::not_implemented;

tests/proxy_creation_tests.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,7 +1224,7 @@ TEST(ProxyCreationTests, TestMakeProxyView) {
12241224
ASSERT_EQ((*std::move(std::as_const(p)))(), 3);
12251225
}
12261226

1227-
TEST(ProxyCreationTests, TestMakeProxyRef) {
1227+
TEST(ProxyCreationTests, TestMakeProxyObserved) {
12281228
struct TestFacade
12291229
: pro::facade_builder //
12301230
::add_convention<pro::operator_dispatch<"()">, int() &, int() const&,
@@ -1238,12 +1238,12 @@ TEST(ProxyCreationTests, TestMakeProxyRef) {
12381238
int operator()() const&& noexcept { return 3; }
12391239
} test_callable;
12401240

1241-
pro::proxy<TestFacade> p = pro::make_proxy_ref<TestFacade>(test_callable);
1241+
pro::proxy<TestFacade> p = pro::make_proxy_observed<TestFacade>(test_callable);
12421242
static_assert(!noexcept((*p)()));
12431243
static_assert(noexcept((*std::move(p))()));
12441244
ASSERT_EQ((*p)(), 0);
12451245
ASSERT_EQ((*std::as_const(p))(), 1);
12461246
ASSERT_EQ((*std::move(p))(), 2);
1247-
p = pro::make_proxy_ref<TestFacade>(test_callable);
1247+
p = pro::make_proxy_observed<TestFacade>(test_callable);
12481248
ASSERT_EQ((*std::move(std::as_const(p)))(), 3);
12491249
}

0 commit comments

Comments
 (0)