Skip to content

Commit 9db2b96

Browse files
committed
Remove uses of boost::remove_extent
1 parent 9b30918 commit 9db2b96

File tree

6 files changed

+16
-19
lines changed

6 files changed

+16
-19
lines changed

include/boost/smart_ptr/allocate_local_shared_array.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ template<class T, class A>
116116
inline typename std::enable_if<is_unbounded_array<T>::value,
117117
local_shared_ptr<T> >::type
118118
allocate_local_shared(const A& allocator, std::size_t count,
119-
const typename remove_extent<T>::type& value)
119+
const typename std::remove_extent<T>::type& value)
120120
{
121121
typedef typename detail::sp_array_element<T>::type element;
122122
typedef typename allocator_rebind<A, element>::type other;
@@ -137,7 +137,7 @@ template<class T, class A>
137137
inline typename std::enable_if<is_bounded_array<T>::value,
138138
local_shared_ptr<T> >::type
139139
allocate_local_shared(const A& allocator,
140-
const typename remove_extent<T>::type& value)
140+
const typename std::remove_extent<T>::type& value)
141141
{
142142
enum {
143143
count = std::extent<T>::value

include/boost/smart_ptr/allocate_shared_array.hpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ Distributed under the Boost Software License, Version 1.0.
1515
#include <boost/type_traits/is_bounded_array.hpp>
1616
#include <boost/type_traits/is_unbounded_array.hpp>
1717
#include <boost/type_traits/remove_cv.hpp>
18-
#include <boost/type_traits/remove_extent.hpp>
1918
#include <boost/type_traits/type_with_alignment.hpp>
2019
#include <type_traits>
2120

@@ -25,7 +24,7 @@ namespace detail {
2524
template<class T>
2625
struct sp_array_element {
2726
typedef typename boost::remove_cv<typename
28-
boost::remove_extent<T>::type>::type type;
27+
std::remove_extent<T>::type>::type type;
2928
};
3029

3130
template<class T>
@@ -295,7 +294,7 @@ allocate_shared(const A& allocator)
295294
template<class T, class A>
296295
inline typename std::enable_if<is_unbounded_array<T>::value, shared_ptr<T> >::type
297296
allocate_shared(const A& allocator, std::size_t count,
298-
const typename remove_extent<T>::type& value)
297+
const typename std::remove_extent<T>::type& value)
299298
{
300299
typedef typename detail::sp_array_element<T>::type element;
301300
typedef typename allocator_rebind<A, element>::type other;
@@ -313,7 +312,7 @@ allocate_shared(const A& allocator, std::size_t count,
313312
template<class T, class A>
314313
inline typename std::enable_if<is_bounded_array<T>::value, shared_ptr<T> >::type
315314
allocate_shared(const A& allocator,
316-
const typename remove_extent<T>::type& value)
315+
const typename std::remove_extent<T>::type& value)
317316
{
318317
enum {
319318
count = std::extent<T>::value

include/boost/smart_ptr/allocate_unique.hpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ Distributed under the Boost Software License, Version 1.0.
1818
#include <boost/type_traits/is_bounded_array.hpp>
1919
#include <boost/type_traits/is_unbounded_array.hpp>
2020
#include <boost/type_traits/remove_cv.hpp>
21-
#include <boost/type_traits/remove_extent.hpp>
2221
#include <boost/type_traits/type_identity.hpp>
2322
#include <boost/config.hpp>
2423
#include <memory>
@@ -57,7 +56,7 @@ struct sp_alloc_result<T[N]> {
5756
template<class T>
5857
struct sp_alloc_value {
5958
typedef typename boost::remove_cv<typename
60-
boost::remove_extent<T>::type>::type type;
59+
std::remove_extent<T>::type>::type type;
6160
};
6261

6362
template<class T, class P>
@@ -434,12 +433,12 @@ template<class T, class A>
434433
inline typename std::enable_if<is_unbounded_array<T>::value,
435434
std::unique_ptr<T, alloc_deleter<T, A> > >::type
436435
allocate_unique(const A& alloc, std::size_t size,
437-
const typename remove_extent<T>::type& value)
436+
const typename std::remove_extent<T>::type& value)
438437
{
439438
detail::sp_alloc_make<T, A> c(alloc, size);
440439
boost::alloc_construct_n(c.state(), boost::first_scalar(c.get()),
441440
size * detail::sp_alloc_size<T>::value, boost::first_scalar(&value),
442-
detail::sp_alloc_size<typename remove_extent<T>::type>::value);
441+
detail::sp_alloc_size<typename std::remove_extent<T>::type>::value);
443442
return c.release();
444443
}
445444

@@ -448,12 +447,12 @@ inline typename std::enable_if<is_bounded_array<T>::value,
448447
std::unique_ptr<typename detail::sp_alloc_result<T>::type,
449448
alloc_deleter<T, A> > >::type
450449
allocate_unique(const A& alloc,
451-
const typename remove_extent<T>::type& value)
450+
const typename std::remove_extent<T>::type& value)
452451
{
453452
detail::sp_alloc_make<T, A> c(alloc, std::extent<T>::value);
454453
boost::alloc_construct_n(c.state(), boost::first_scalar(c.get()),
455454
detail::sp_alloc_size<T>::value, boost::first_scalar(&value),
456-
detail::sp_alloc_size<typename remove_extent<T>::type>::value);
455+
detail::sp_alloc_size<typename std::remove_extent<T>::type>::value);
457456
return c.release();
458457
}
459458

include/boost/smart_ptr/make_local_shared_array.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ make_local_shared()
2727
template<class T>
2828
inline typename std::enable_if<is_bounded_array<T>::value,
2929
local_shared_ptr<T> >::type
30-
make_local_shared(const typename remove_extent<T>::type& value)
30+
make_local_shared(const typename std::remove_extent<T>::type& value)
3131
{
3232
return boost::allocate_local_shared<T>(boost::default_allocator<typename
3333
detail::sp_array_element<T>::type>(), value);
@@ -46,7 +46,7 @@ template<class T>
4646
inline typename std::enable_if<is_unbounded_array<T>::value,
4747
local_shared_ptr<T> >::type
4848
make_local_shared(std::size_t size,
49-
const typename remove_extent<T>::type& value)
49+
const typename std::remove_extent<T>::type& value)
5050
{
5151
return boost::allocate_local_shared<T>(boost::default_allocator<typename
5252
detail::sp_array_element<T>::type>(), size, value);

include/boost/smart_ptr/make_shared_array.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ make_shared()
2424

2525
template<class T>
2626
inline typename std::enable_if<is_bounded_array<T>::value, shared_ptr<T> >::type
27-
make_shared(const typename remove_extent<T>::type& value)
27+
make_shared(const typename std::remove_extent<T>::type& value)
2828
{
2929
return boost::allocate_shared<T>(boost::default_allocator<typename
3030
detail::sp_array_element<T>::type>(), value);
@@ -40,7 +40,7 @@ make_shared(std::size_t size)
4040

4141
template<class T>
4242
inline typename std::enable_if<is_unbounded_array<T>::value, shared_ptr<T> >::type
43-
make_shared(std::size_t size, const typename remove_extent<T>::type& value)
43+
make_shared(std::size_t size, const typename std::remove_extent<T>::type& value)
4444
{
4545
return boost::allocate_shared<T>(boost::default_allocator<typename
4646
detail::sp_array_element<T>::type>(), size, value);

include/boost/smart_ptr/make_unique.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ Distributed under the Boost Software License, Version 1.0.
1010

1111
#include <boost/type_traits/is_array.hpp>
1212
#include <boost/type_traits/is_unbounded_array.hpp>
13-
#include <boost/type_traits/remove_extent.hpp>
1413
#include <memory>
1514
#include <utility>
1615
#include <type_traits>
@@ -50,15 +49,15 @@ inline typename std::enable_if<is_unbounded_array<T>::value,
5049
std::unique_ptr<T> >::type
5150
make_unique(std::size_t size)
5251
{
53-
return std::unique_ptr<T>(new typename remove_extent<T>::type[size]());
52+
return std::unique_ptr<T>(new typename std::remove_extent<T>::type[size]());
5453
}
5554

5655
template<class T>
5756
inline typename std::enable_if<is_unbounded_array<T>::value,
5857
std::unique_ptr<T> >::type
5958
make_unique_noinit(std::size_t size)
6059
{
61-
return std::unique_ptr<T>(new typename remove_extent<T>::type[size]);
60+
return std::unique_ptr<T>(new typename std::remove_extent<T>::type[size]);
6261
}
6362

6463
} /* boost */

0 commit comments

Comments
 (0)