From e572d6c34076bdc28c4698d996becd012ce4f5cd Mon Sep 17 00:00:00 2001 From: Michael Krasnyk Date: Mon, 26 Mar 2018 22:08:39 +0200 Subject: [PATCH] msvc fixes --- include/storage/block.hpp | 10 ++++++++-- include/util/indexed_data.hpp | 4 +++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/include/storage/block.hpp b/include/storage/block.hpp index ccd2ce70d..47478e5eb 100644 --- a/include/storage/block.hpp +++ b/include/storage/block.hpp @@ -14,8 +14,14 @@ namespace storage struct Block { - std::uint64_t num_entries = 0; - std::uint64_t byte_size = 0; + std::uint64_t num_entries; + std::uint64_t byte_size; + + Block() : num_entries(0), byte_size(0) {} + Block(std::uint64_t num_entries, std::uint64_t byte_size) + : num_entries(num_entries), byte_size(byte_size) + { + } }; using NamedBlock = std::tuple; diff --git a/include/util/indexed_data.hpp b/include/util/indexed_data.hpp index 68c8d2157..080311040 100644 --- a/include/util/indexed_data.hpp +++ b/include/util/indexed_data.hpp @@ -322,7 +322,9 @@ template struct Indexe auto to_bytes = [&](const auto &data) { values_byte_iter = std::copy_n(&data, sizeof(ValueType), values_byte_iter); }; - std::copy(data + *curr, data + *next, boost::make_function_output_iterator(to_bytes)); + std::copy(data + *curr, + data + *next, + boost::make_function_output_iterator(std::cref(to_bytes))); } }