From f2ae0f5a3ae386ac6f3cff8d1324fee039ffe41e Mon Sep 17 00:00:00 2001 From: mutouyun Date: Sun, 28 May 2023 12:47:38 +0800 Subject: [PATCH] fix: (vs2015) call does not result in a constant expression --- include/libconcur/concurrent.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/libconcur/concurrent.h b/include/libconcur/concurrent.h index aaea18a..440d664 100644 --- a/include/libconcur/concurrent.h +++ b/include/libconcur/concurrent.h @@ -457,14 +457,14 @@ struct prod_cons : producer , traits>::header { index_t const circ_size; - constexpr header(index_t cs) noexcept + header(index_t cs) noexcept : circ_size(cs) {} template - constexpr header(::LIBIMP::span> const &elems) noexcept + header(::LIBIMP::span> const &elems) noexcept : circ_size(static_cast(elems.size())) {} - constexpr bool valid() const noexcept { + bool valid() const noexcept { // circ_size must be a power of two. return (circ_size > 1) && ((circ_size & (circ_size - 1)) == 0); }