forked from boostorg/smart_ptr
Fix g++ issues.
[SVN r81222]
This commit is contained in:
@@ -19,7 +19,7 @@ namespace boost {
|
|||||||
template<typename T, typename A>
|
template<typename T, typename A>
|
||||||
inline typename detail::sp_if_array<T>::type
|
inline typename detail::sp_if_array<T>::type
|
||||||
allocate_shared(const A& allocator, size_t size) {
|
allocate_shared(const A& allocator, size_t size) {
|
||||||
typedef typename remove_cv<shared_ptr<T>::element_type>::type T1;
|
typedef typename remove_cv<typename shared_ptr<T>::element_type>::type T1;
|
||||||
T1* p1 = 0;
|
T1* p1 = 0;
|
||||||
detail::allocate_array_helper<A, T1> a1(allocator, size, &p1);
|
detail::allocate_array_helper<A, T1> a1(allocator, size, &p1);
|
||||||
detail::array_deleter<T1> d1;
|
detail::array_deleter<T1> d1;
|
||||||
@@ -33,7 +33,7 @@ namespace boost {
|
|||||||
template<typename T, typename A, typename... Args>
|
template<typename T, typename A, typename... Args>
|
||||||
inline typename detail::sp_if_array<T>::type
|
inline typename detail::sp_if_array<T>::type
|
||||||
allocate_shared(const A& allocator, size_t size, Args&&... args) {
|
allocate_shared(const A& allocator, size_t size, Args&&... args) {
|
||||||
typedef typename remove_cv<shared_ptr<T>::element_type>::type T1;
|
typedef typename remove_cv<typename shared_ptr<T>::element_type>::type T1;
|
||||||
T1* p1 = 0;
|
T1* p1 = 0;
|
||||||
detail::allocate_array_helper<A, T1> a1(allocator, size, &p1);
|
detail::allocate_array_helper<A, T1> a1(allocator, size, &p1);
|
||||||
detail::array_deleter<T1> d1;
|
detail::array_deleter<T1> d1;
|
||||||
|
@@ -16,10 +16,10 @@ namespace boost {
|
|||||||
namespace detail {
|
namespace detail {
|
||||||
template<typename A, typename T, typename Y = T>
|
template<typename A, typename T, typename Y = T>
|
||||||
class allocate_array_helper {
|
class allocate_array_helper {
|
||||||
template<typename A, typename T, typename Y>
|
template<typename A9, typename T9, typename Y9>
|
||||||
friend class allocate_array_helper;
|
friend class allocate_array_helper;
|
||||||
typedef typename A::rebind<Y> ::other A2;
|
typedef typename A::template rebind<Y> ::other A2;
|
||||||
typedef typename A::rebind<char>::other A3;
|
typedef typename A::template rebind<char>::other A3;
|
||||||
public:
|
public:
|
||||||
typedef typename A2::value_type value_type;
|
typedef typename A2::value_type value_type;
|
||||||
typedef typename A2::pointer pointer;
|
typedef typename A2::pointer pointer;
|
||||||
|
@@ -16,16 +16,16 @@ namespace boost {
|
|||||||
namespace detail {
|
namespace detail {
|
||||||
template<typename T, typename Y = T>
|
template<typename T, typename Y = T>
|
||||||
class make_array_helper {
|
class make_array_helper {
|
||||||
template<typename T, typename Y>
|
template<typename T2, typename Y2>
|
||||||
friend class make_array_helper;
|
friend class make_array_helper;
|
||||||
public:
|
public:
|
||||||
typedef typename Y value_type;
|
typedef Y value_type;
|
||||||
typedef typename Y* pointer;
|
typedef Y* pointer;
|
||||||
typedef typename const Y* const_pointer;
|
typedef const Y* const_pointer;
|
||||||
typedef typename Y& reference;
|
typedef Y& reference;
|
||||||
typedef typename const Y& const_reference;
|
typedef const Y& const_reference;
|
||||||
typedef typename std::size_t size_type;
|
typedef std::size_t size_type;
|
||||||
typedef typename ptrdiff_t difference_type;
|
typedef ptrdiff_t difference_type;
|
||||||
template<typename U>
|
template<typename U>
|
||||||
struct rebind {
|
struct rebind {
|
||||||
typedef make_array_helper<T, U> other;
|
typedef make_array_helper<T, U> other;
|
||||||
|
@@ -19,7 +19,7 @@ namespace boost {
|
|||||||
template<typename T>
|
template<typename T>
|
||||||
inline typename detail::sp_if_array<T>::type
|
inline typename detail::sp_if_array<T>::type
|
||||||
make_shared(std::size_t size) {
|
make_shared(std::size_t size) {
|
||||||
typedef typename remove_cv<shared_ptr<T>::element_type>::type T1;
|
typedef typename remove_cv<typename shared_ptr<T>::element_type>::type T1;
|
||||||
T1* p1 = 0;
|
T1* p1 = 0;
|
||||||
detail::make_array_helper<T1> a1(size, &p1);
|
detail::make_array_helper<T1> a1(size, &p1);
|
||||||
detail::array_deleter<T1> d1;
|
detail::array_deleter<T1> d1;
|
||||||
@@ -33,7 +33,7 @@ namespace boost {
|
|||||||
template<typename T, typename... Args>
|
template<typename T, typename... Args>
|
||||||
inline typename detail::sp_if_array<T>::type
|
inline typename detail::sp_if_array<T>::type
|
||||||
make_shared(std::size_t size, Args&&... args) {
|
make_shared(std::size_t size, Args&&... args) {
|
||||||
typedef typename remove_cv<shared_ptr<T>::element_type>::type T1;
|
typedef typename remove_cv<typename shared_ptr<T>::element_type>::type T1;
|
||||||
T1* p1 = 0;
|
T1* p1 = 0;
|
||||||
detail::make_array_helper<T1> a1(size, &p1);
|
detail::make_array_helper<T1> a1(size, &p1);
|
||||||
detail::array_deleter<T1> d1;
|
detail::array_deleter<T1> d1;
|
||||||
@@ -47,7 +47,7 @@ namespace boost {
|
|||||||
template<typename T>
|
template<typename T>
|
||||||
inline typename detail::sp_if_array<T>::type
|
inline typename detail::sp_if_array<T>::type
|
||||||
make_shared_noinit(std::size_t size) {
|
make_shared_noinit(std::size_t size) {
|
||||||
typedef typename remove_cv<shared_ptr<T>::element_type>::type T1;
|
typedef typename remove_cv<typename shared_ptr<T>::element_type>::type T1;
|
||||||
T1* p1 = 0;
|
T1* p1 = 0;
|
||||||
detail::make_array_helper<T1> a1(size, &p1);
|
detail::make_array_helper<T1> a1(size, &p1);
|
||||||
detail::array_deleter<T1> d1;
|
detail::array_deleter<T1> d1;
|
||||||
|
Reference in New Issue
Block a user