diff --git a/include/opendht/infohash.h b/include/opendht/infohash.h index 29e152a3c5c291e9a077a1c17e44680bc27677c2..a880ae8002e0fbec213b186a3b9c9c0d1c121e9f 100644 --- a/include/opendht/infohash.h +++ b/include/opendht/infohash.h @@ -345,8 +345,8 @@ Hash<N>::getRandom(Rd& rdev) } struct alignas(std::max_align_t) HexMap : public std::array<std::array<char, 2>, 256> { - HexMap() { - for (size_t i=0; i<size(); i++) { + constexpr HexMap() : std::array<std::array<char, 2>, 256>() { + for (size_t i = 0; i < size(); i++) { auto& e = (*this)[i]; e[0] = hex_digits[(i >> 4) & 0x0F]; e[1] = hex_digits[i & 0x0F];