@@ -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
3233This 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
8990the existing explicit conversion to `multi_ptr<void, Space>`.
9091
9192TODO(Peter): Table
0 commit comments