From 9b309184f8d58b67ed7d241080f6f346a57af30e Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 6 Oct 2024 19:23:15 +0300 Subject: [PATCH] Remove uses of boost::extent --- include/boost/smart_ptr/allocate_local_shared_array.hpp | 4 ++-- include/boost/smart_ptr/allocate_shared_array.hpp | 9 ++++----- include/boost/smart_ptr/allocate_unique.hpp | 5 ++--- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/include/boost/smart_ptr/allocate_local_shared_array.hpp b/include/boost/smart_ptr/allocate_local_shared_array.hpp index d472418..2c890ee 100644 --- a/include/boost/smart_ptr/allocate_local_shared_array.hpp +++ b/include/boost/smart_ptr/allocate_local_shared_array.hpp @@ -95,7 +95,7 @@ inline typename std::enable_if::value, allocate_local_shared(const A& allocator) { enum { - count = extent::value + count = std::extent::value }; typedef typename detail::sp_array_element::type element; typedef typename allocator_rebind::type other; @@ -140,7 +140,7 @@ allocate_local_shared(const A& allocator, const typename remove_extent::type& value) { enum { - count = extent::value + count = std::extent::value }; typedef typename detail::sp_array_element::type element; typedef typename allocator_rebind::type other; diff --git a/include/boost/smart_ptr/allocate_shared_array.hpp b/include/boost/smart_ptr/allocate_shared_array.hpp index e7ec10f..4a2bf50 100644 --- a/include/boost/smart_ptr/allocate_shared_array.hpp +++ b/include/boost/smart_ptr/allocate_shared_array.hpp @@ -12,7 +12,6 @@ Distributed under the Boost Software License, Version 1.0. #include #include #include -#include #include #include #include @@ -278,11 +277,11 @@ inline typename std::enable_if::value, shared_ptr >::type allocate_shared(const A& allocator) { enum { - count = extent::value + count = std::extent::value }; typedef typename detail::sp_array_element::type element; typedef typename allocator_rebind::type other; - typedef detail::sp_size_array_state::value> state; + typedef detail::sp_size_array_state::value> state; typedef detail::sp_array_base base; detail::sp_array_result result(allocator, count); base* node = result.get(); @@ -317,11 +316,11 @@ allocate_shared(const A& allocator, const typename remove_extent::type& value) { enum { - count = extent::value + count = std::extent::value }; typedef typename detail::sp_array_element::type element; typedef typename allocator_rebind::type other; - typedef detail::sp_size_array_state::value> state; + typedef detail::sp_size_array_state::value> state; typedef detail::sp_array_base base; detail::sp_array_result result(allocator, count); base* node = result.get(); diff --git a/include/boost/smart_ptr/allocate_unique.hpp b/include/boost/smart_ptr/allocate_unique.hpp index abc9f1e..9317f95 100644 --- a/include/boost/smart_ptr/allocate_unique.hpp +++ b/include/boost/smart_ptr/allocate_unique.hpp @@ -14,7 +14,6 @@ Distributed under the Boost Software License, Version 1.0. #include #include #include -#include #include #include #include @@ -408,7 +407,7 @@ inline typename std::enable_if::value, alloc_deleter > >::type allocate_unique(const A& alloc) { - detail::sp_alloc_make c(alloc, extent::value); + detail::sp_alloc_make c(alloc, std::extent::value); boost::alloc_construct_n(c.state(), boost::first_scalar(c.get()), detail::sp_alloc_size::value); return c.release(); @@ -451,7 +450,7 @@ inline typename std::enable_if::value, allocate_unique(const A& alloc, const typename remove_extent::type& value) { - detail::sp_alloc_make c(alloc, extent::value); + detail::sp_alloc_make c(alloc, std::extent::value); boost::alloc_construct_n(c.state(), boost::first_scalar(c.get()), detail::sp_alloc_size::value, boost::first_scalar(&value), detail::sp_alloc_size::type>::value);