The C++ compiler error when using `Write()` (and related methods) on a read-only view type is confusing
Open
cleanup
- Dominant language
- Python
- Stars
- 92
- Forks
- 30
- PR merge metrics
- No merged PRs in 30d
Description
The compiler complains about passing the wrong type to `memcpy()` (passing `const char *` as the first argument) deep inside Emboss internal template code, which is not clear to an end user.
Using `std::enable_if<... backing storage is writeable>` on `Write()` would help. Ideally, we could coerce the C++ compiler to emit a message saying to use the `...Writer` type alias instead of `...View`.
Contributor guide
Assessment
This issue has not been assessed yet.