Relax static_asserts in src/lmdb

This commit is contained in:
Lee Clagett 2024-10-09 16:34:25 -04:00
parent 9866a0e902
commit bd2869650a
4 changed files with 5 additions and 3 deletions

View file

@ -162,8 +162,8 @@ namespace lmdb
G get_value() const noexcept
{
static_assert(std::is_same<U, T>(), "bad MONERO_FIELD usage?");
static_assert(std::is_pod<U>(), "value type must be pod");
static_assert(std::is_pod<G>(), "field type must be pod");
static_assert(std::is_trivially_copyable<U>(), "value type must be memcpy safe");
static_assert(std::is_trivially_copyable<G>(), "field type must be memcpy safe");
static_assert(sizeof(G) + uoffset <= sizeof(U), "bad field and/or offset");
assert(sizeof(G) + uoffset <= values.size());
assert(!is_end());