Skip to content

Commit 7129802

Browse files
committed
Minor formatting changes
1 parent 7d93814 commit 7129802

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

multi_ptr-cast/sycl-2.2/index.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ is to use both casts like so:
2626
```cpp
2727
// Using global_ptr here to simplify the code
2828
// decltype(multiPtrA) == global_ptr<A>
29-
auto multiPtrB = static_cast<global_ptr<B>>(static_cast<global_ptr<void>>(multiPtrA));
29+
auto multiPtrB = static_cast<global_ptr<B>>(
30+
static_cast<global_ptr<void>>(multiPtrA));
3031
```
3132

3233
This is problematic on a few levels:
@@ -62,9 +63,9 @@ class multi_ptr {
6263

6364
...
6465

65-
// Explicit conversion to `multi_ptr<U, Space>`
66-
template <typename U>
67-
explicit operator multi_ptr<U, Space>() const;
66+
// Explicit conversion to `multi_ptr<ElementTypeU, Space>`
67+
template <typename ElementTypeU>
68+
explicit operator multi_ptr<ElementTypeU, Space>() const;
6869

6970
// Explicit conversion to `multi_ptr<const ElementType, Space>`
7071
explicit operator multi_ptr<const ElementType, Space>() const;
@@ -85,7 +86,7 @@ class multi_ptr<void, Space> {
8586
} // namespace cl
8687
```
8788
88-
The conversion operator to `multi_ptr<U, Space>` replaces
89+
The conversion operator to `multi_ptr<ElementTypeU, Space>` replaces
8990
the existing explicit conversion to `multi_ptr<void, Space>`.
9091
9192
TODO(Peter): Table

0 commit comments

Comments
 (0)