From eae98e909e874e978f282ec5e93ddb0e760636ca Mon Sep 17 00:00:00 2001 From: Glen Fernandes Date: Sun, 31 Oct 2021 20:50:02 -0400 Subject: [PATCH] MSVC warning workaround for as_bytes --- include/boost/core/span.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/boost/core/span.hpp b/include/boost/core/span.hpp index bafb286..a0be177 100644 --- a/include/boost/core/span.hpp +++ b/include/boost/core/span.hpp @@ -146,8 +146,12 @@ struct span_store { template struct span_bytes { - static constexpr std::size_t value = E == boost::dynamic_extent ? - boost::dynamic_extent : sizeof(T) * E; + static constexpr std::size_t value = sizeof(T) * E; +}; + +template +struct span_bytes { + static constexpr std::size_t value = boost::dynamic_extent; }; } /* detail */