mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 12:28:42 +00:00
Make Hash default constructor, hex constructor, data(), const operator[] and fromString constexpr. Change fromString to be non-throwing: it now uses a validity flag and fills the hash with zeros on parse error instead of throwing. Add a constexpr toHexArray helper that returns a std::array<char, N*2> for compile-time hex conversion. Update tests to include <string_view>, use std::string_view, add constexpr InfoHash usage and a static_assert for the hex array.