summaryrefslogtreecommitdiffhomepage
path: root/serialize/binary-reader.inl
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-03-17 06:48:35 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-03-17 23:23:11 +0100
commit56c15ab0db6c12f34b27325069b2bd97e1db4954 (patch)
treeceee9df11ce73685e6935504264bd163da32265c /serialize/binary-reader.inl
parent73fc95bc7bbdfe24e535f390f79d33fb809c0151 (diff)
serialize/reader: add missing constexpr
Diffstat (limited to 'serialize/binary-reader.inl')
-rw-r--r--serialize/binary-reader.inl6
1 files changed, 3 insertions, 3 deletions
diff --git a/serialize/binary-reader.inl b/serialize/binary-reader.inl
index 1234b08a..4d52490f 100644
--- a/serialize/binary-reader.inl
+++ b/serialize/binary-reader.inl
@@ -49,14 +49,14 @@ constexpr void binary_reader<It>::assert_end() noexcept(false)
}
template<string_input_iterator It, serializable T>
-binary_reader<It>& operator>>(binary_reader<It>& reader, T& x) noexcept(false)
+constexpr binary_reader<It>& operator>>(binary_reader<It>& reader, T& x) noexcept(false)
{
x = reader.template read<T>();
return reader;
}
template<string_input_iterator It, serializable T>
-void operator<<(T& x, binary_reader<It>& reader) noexcept(false)
+constexpr void operator<<(T& x, binary_reader<It>& reader) noexcept(false)
{
x = reader.template read<T>();
}
@@ -70,7 +70,7 @@ constexpr auto binary_reader<It>::read_asciiz_string() noexcept(false)
struct fixed_string final {
char buf[MAX];
std::size_t len;
- operator StringView() const noexcept { return { buf, len, StringViewFlag::NullTerminated }; }
+ constexpr operator StringView() const noexcept { return { buf, len, StringViewFlag::NullTerminated }; }
};
fixed_string ret;