Added tests
This commit is contained in:
@@ -62,7 +62,7 @@ namespace io {
|
||||
|
||||
// @todo Merge this into one function with the proper default automatically
|
||||
template <Container T>
|
||||
void write(std::ostream& os, T value, bool store_length = true) {
|
||||
void write(std::ostream& os, const T& value, bool store_length = true) {
|
||||
if (store_length) {
|
||||
write<size_t>(os, value.size());
|
||||
}
|
||||
@@ -72,7 +72,7 @@ namespace io {
|
||||
}
|
||||
|
||||
template <Container T> requires requires (T a) { std::tuple_size<T>::value; }
|
||||
void write(std::ostream& os, T value, bool store_length = false) {
|
||||
void write(std::ostream& os, const T& value, bool store_length = false) {
|
||||
if (store_length) {
|
||||
write<size_t>(os, value.size());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user