From 269fd3c10f351e916969b5bb667446798a8c26f4 Mon Sep 17 00:00:00 2001 From: Kim Laine Date: Fri, 12 Feb 2021 14:58:59 -0800 Subject: [PATCH] C++14 compatibility --- native/src/seal/randomgen.h | 4 ++-- native/src/seal/serialization.h | 2 +- native/tests/seal/util/mempool.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/native/src/seal/randomgen.h b/native/src/seal/randomgen.h index f5169572d..addada160 100644 --- a/native/src/seal/randomgen.h +++ b/native/src/seal/randomgen.h @@ -17,9 +17,9 @@ namespace seal { - inline constexpr std::size_t prng_seed_uint64_count = 8; + constexpr std::size_t prng_seed_uint64_count = 8; - inline constexpr std::size_t prng_seed_byte_count = prng_seed_uint64_count * util::bytes_per_uint64; + constexpr std::size_t prng_seed_byte_count = prng_seed_uint64_count * util::bytes_per_uint64; using prng_seed_type = std::array; diff --git a/native/src/seal/serialization.h b/native/src/seal/serialization.h index 6d79b7f5e..1f482ac00 100644 --- a/native/src/seal/serialization.h +++ b/native/src/seal/serialization.h @@ -90,7 +90,7 @@ namespace seal std::uint64_t size = 0; }; - static_assert(sizeof(SEALHeader) == seal_header_size); + static_assert(sizeof(SEALHeader) == seal_header_size, ""); /** Returns true if the given byte corresponds to a supported compression mode. diff --git a/native/tests/seal/util/mempool.cpp b/native/tests/seal/util/mempool.cpp index 68015a86d..a850056aa 100644 --- a/native/tests/seal/util/mempool.cpp +++ b/native/tests/seal/util/mempool.cpp @@ -557,7 +557,7 @@ namespace sealtest TEST(MemoryPoolTests, Allocate) { MemoryPool &pool = *global_variables::global_memory_pool; - vector bytes{ seal_byte{ 0 }, seal_byte{ 1 }, seal_byte{ 2 }, seal_byte{ 3 }, seal_byte{ 4 } }; + vector bytes{ seal_byte(0), seal_byte(1), seal_byte(2), seal_byte(3), seal_byte(4) }; auto ptr = allocate(bytes.begin(), bytes.size(), pool); ASSERT_TRUE(equal(bytes.begin(), bytes.end(), ptr.get())); }