diff --git a/doc/span.qbk b/doc/span.qbk index 7d8d3e3..e2a1425 100644 --- a/doc/span.qbk +++ b/doc/span.qbk @@ -134,14 +134,6 @@ public: constexpr const_iterator cend() const noexcept; constexpr const_reverse_iterator crbegin() const noexcept; constexpr const_reverse_iterator crend() const noexcept; - - friend constexpr iterator begin(span s) noexcept { - return s.begin(); - } - - friend constexpr iterator end(span s) noexcept { - return s.end(); - } }; template diff --git a/include/boost/core/span.hpp b/include/boost/core/span.hpp index 54dafdb..cbe8556 100644 --- a/include/boost/core/span.hpp +++ b/include/boost/core/span.hpp @@ -347,14 +347,6 @@ public: return const_reverse_iterator(s_.p); } - friend constexpr iterator begin(span s) noexcept { - return s.begin(); - } - - friend constexpr iterator end(span s) noexcept { - return s.end(); - } - private: detail::span_store s_; }; diff --git a/test/span_test.cpp b/test/span_test.cpp index 1009cba..fb05778 100644 --- a/test/span_test.cpp +++ b/test/span_test.cpp @@ -362,18 +362,6 @@ void test_crend() BOOST_TEST_EQ((boost::span(&a[0], 4).crend().base()), &a[0]); } -void test_begin_span() -{ - int a[4]; - BOOST_TEST_EQ((begin(boost::span(&a[0], 4))), &a[0]); -} - -void test_end_span() -{ - int a[4]; - BOOST_TEST_EQ((end(boost::span(&a[0], 4))), &a[4]); -} - int main() { test_extent(); @@ -421,8 +409,6 @@ int main() test_cend(); test_crbegin(); test_crend(); - test_begin_span(); - test_end_span(); return boost::report_errors(); } #else