Specification Version
SYCL 2020 (Revision 11)
Section Number(s)
Section 4.7.2.1. Constructors, https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#api:buffer-ctor-container.
Issue Description
This section includes the following two sentences:
- The return type of
std::data(container) is convertible to T*.
- Data is written back to container before the completion of buffer destruction if the return type of
std::data(container) is not const.
The "is not const" at the end of the second sentence is confusing. If the return type is const, this would violate constraint (1) since it wouldn't be convertible to T*. It seems the constraint should instead be that std::data(container) is convertible to const T *.
Code Example (Optional)
Relevant example is in 0x12CC/ProtoSYCL#3.
Specification Version
SYCL 2020 (Revision 11)
Section Number(s)
Section 4.7.2.1. Constructors, https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#api:buffer-ctor-container.
Issue Description
This section includes the following two sentences:
std::data(container)is convertible toT*.std::data(container)is notconst.The "is not
const" at the end of the second sentence is confusing. If the return type isconst, this would violate constraint (1) since it wouldn't be convertible toT*. It seems the constraint should instead be thatstd::data(container)is convertible toconst T *.Code Example (Optional)
Relevant example is in 0x12CC/ProtoSYCL#3.