diff --git a/include/boost/core/detail/assert.hpp b/include/boost/core/detail/assert.hpp index daf5c4e4..d2d16a78 100644 --- a/include/boost/core/detail/assert.hpp +++ b/include/boost/core/detail/assert.hpp @@ -5,7 +5,7 @@ Copyright 2025 Glen Joseph Fernandes Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ -#undef BOOST_CORE_ASSERT +#undef BOOST_CORE_DETAIL_ASSERT #include @@ -14,8 +14,8 @@ Distributed under the Boost Software License, Version 1.0. !defined(__INTEL_COMPILER) && \ defined(__GNUC__) && \ (__GNUC__ < 5) -#define BOOST_CORE_ASSERT(expr) \ +#define BOOST_CORE_DETAIL_ASSERT(expr) \ ((expr) ? void(0) : __assert_fail(#expr, __FILE__, __LINE__, 0)) #else -#define BOOST_CORE_ASSERT(expr) assert(expr) +#define BOOST_CORE_DETAIL_ASSERT(expr) assert(expr) #endif diff --git a/include/boost/core/span.hpp b/include/boost/core/span.hpp index 67323682..3a602c25 100644 --- a/include/boost/core/span.hpp +++ b/include/boost/core/span.hpp @@ -275,18 +275,18 @@ class span { } constexpr span first(size_type c) const { - return BOOST_CORE_ASSERT(c <= size()), + return BOOST_CORE_DETAIL_ASSERT(c <= size()), span(s_.p, c); } constexpr span last(size_type c) const { - return BOOST_CORE_ASSERT(c <= size()), + return BOOST_CORE_DETAIL_ASSERT(c <= size()), span(s_.p + (s_.n - c), c); } constexpr span subspan(size_type o, size_type c = dynamic_extent) const { - return BOOST_CORE_ASSERT(o <= size() && + return BOOST_CORE_DETAIL_ASSERT(o <= size() && (c == dynamic_extent || c + o <= size())), span(s_.p + o, c == dynamic_extent ? s_.n - o : c); @@ -305,15 +305,15 @@ class span { } constexpr reference operator[](size_type i) const { - return BOOST_CORE_ASSERT(i < size()), s_.p[i]; + return BOOST_CORE_DETAIL_ASSERT(i < size()), s_.p[i]; } constexpr reference front() const { - return BOOST_CORE_ASSERT(!empty()), *s_.p; + return BOOST_CORE_DETAIL_ASSERT(!empty()), *s_.p; } constexpr reference back() const { - return BOOST_CORE_ASSERT(!empty()), s_.p[s_.n - 1]; + return BOOST_CORE_DETAIL_ASSERT(!empty()), s_.p[s_.n - 1]; } constexpr pointer data() const noexcept {