serializer: replace enable_if in deserialized_bytes_proxy with constraint

Simpler to read and understand.

Closes #8303
This commit is contained in:
Avi Kivity
2021-03-17 17:01:01 +02:00
committed by Piotr Sarna
parent 7c953f33d5
commit 405c4e7af1

View File

@@ -469,7 +469,8 @@ public:
explicit deserialized_bytes_proxy(Stream stream)
: _stream(std::move(stream)) { }
template<typename OtherStream, typename = std::enable_if_t<std::is_convertible_v<OtherStream, Stream>>>
template<typename OtherStream>
requires std::convertible_to<OtherStream, Stream>
deserialized_bytes_proxy(deserialized_bytes_proxy<OtherStream> proxy)
: _stream(std::move(proxy._stream)) { }