From 4a9c3875196c901fb5a7d1d55f1ec8dce239fe76 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Sat, 31 Oct 2020 11:42:43 +0300 Subject: [PATCH] mdbx++: fix static_assertion slice::slice(text). Change-Id: Id77d6064461becd4a9d8e2b914d39217f7a3b575 --- mdbx.h++ | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mdbx.h++ b/mdbx.h++ index 07d65058..bd6a0a17 100644 --- a/mdbx.h++ +++ b/mdbx.h++ @@ -396,8 +396,7 @@ struct LIBMDBX_API_TYPE slice : public ::MDBX_val { template MDBX_CXX14_CONSTEXPR slice(const char (&text)[SIZE]) noexcept : slice(text, SIZE - 1) { - static_assert(SIZE > 0 && text[SIZE - 1] == '\0', - "Must be a null-terminated C-string"); + MDBX_CONSTEXPR_ASSERT(SIZE > 0 && text[SIZE - 1] == '\0'); } /// \brief Create a slice that refers to c_str[0,strlen(c_str)-1]. explicit MDBX_CXX17_CONSTEXPR slice(const char *c_str);