BinaryWriter: fix an issue with writeValueToArray().

The view needs to be of type T, not U (which can potentially be T&).
This commit is contained in:
Guillaume Jacquemin 2022-02-13 15:03:45 +01:00
parent 2ff32c4c78
commit 5e06c48492
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ class BinaryWriter {
template<typename T, typename U = std::conditional_t<std::is_trivially_copyable<T>::value, T, T&>>
auto writeValueToArray(U value) -> UnsignedLong {
Containers::ArrayView<U> view{&value, 1};
Containers::ArrayView<T> view{&value, 1};
return writeDataToArray(view);
}