forked from boostorg/smart_ptr
Make sp_counted_impl_ specialization more generic
This commit is contained in:
@ -20,7 +20,7 @@ namespace boost {
|
|||||||
typedef typename boost::detail::array_base<T1>::type T2;
|
typedef typename boost::detail::array_base<T1>::type T2;
|
||||||
typedef boost::detail::ms_init_tag R1;
|
typedef boost::detail::ms_init_tag R1;
|
||||||
typedef boost::detail::ms_allocator<T, R1, A> A1;
|
typedef boost::detail::ms_allocator<T, R1, A> A1;
|
||||||
typedef boost::detail::ms_noop D1;
|
typedef boost::detail::ms_in_allocator_tag D1;
|
||||||
std::size_t n1 = size * boost::detail::array_total<T1>::size;
|
std::size_t n1 = size * boost::detail::array_total<T1>::size;
|
||||||
T1* p1 = 0;
|
T1* p1 = 0;
|
||||||
T2* p2 = 0;
|
T2* p2 = 0;
|
||||||
@ -45,7 +45,7 @@ namespace boost {
|
|||||||
typedef typename boost::detail::array_base<T1>::type T2;
|
typedef typename boost::detail::array_base<T1>::type T2;
|
||||||
typedef boost::detail::ms_init_tag R1;
|
typedef boost::detail::ms_init_tag R1;
|
||||||
typedef boost::detail::ms_allocator<T, R1, A> A1;
|
typedef boost::detail::ms_allocator<T, R1, A> A1;
|
||||||
typedef boost::detail::ms_noop D1;
|
typedef boost::detail::ms_in_allocator_tag D1;
|
||||||
enum {
|
enum {
|
||||||
N = boost::detail::array_total<T>::size
|
N = boost::detail::array_total<T>::size
|
||||||
};
|
};
|
||||||
@ -74,7 +74,7 @@ namespace boost {
|
|||||||
typedef const T2 T3;
|
typedef const T2 T3;
|
||||||
typedef boost::detail::ms_init_tag R1;
|
typedef boost::detail::ms_init_tag R1;
|
||||||
typedef boost::detail::ms_allocator<T, R1, A> A1;
|
typedef boost::detail::ms_allocator<T, R1, A> A1;
|
||||||
typedef boost::detail::ms_noop D1;
|
typedef boost::detail::ms_in_allocator_tag D1;
|
||||||
enum {
|
enum {
|
||||||
M = boost::detail::array_total<T1>::size
|
M = boost::detail::array_total<T1>::size
|
||||||
};
|
};
|
||||||
@ -105,7 +105,7 @@ namespace boost {
|
|||||||
typedef const T2 T3;
|
typedef const T2 T3;
|
||||||
typedef boost::detail::ms_init_tag R1;
|
typedef boost::detail::ms_init_tag R1;
|
||||||
typedef boost::detail::ms_allocator<T, R1, A> A1;
|
typedef boost::detail::ms_allocator<T, R1, A> A1;
|
||||||
typedef boost::detail::ms_noop D1;
|
typedef boost::detail::ms_in_allocator_tag D1;
|
||||||
enum {
|
enum {
|
||||||
N = boost::detail::array_total<T>::size,
|
N = boost::detail::array_total<T>::size,
|
||||||
M = boost::detail::array_total<T1>::size
|
M = boost::detail::array_total<T1>::size
|
||||||
@ -134,7 +134,7 @@ namespace boost {
|
|||||||
typedef typename boost::detail::array_base<T1>::type T2;
|
typedef typename boost::detail::array_base<T1>::type T2;
|
||||||
typedef boost::detail::ms_noinit_tag R1;
|
typedef boost::detail::ms_noinit_tag R1;
|
||||||
typedef boost::detail::ms_allocator<T, R1, A> A1;
|
typedef boost::detail::ms_allocator<T, R1, A> A1;
|
||||||
typedef boost::detail::ms_noop D1;
|
typedef boost::detail::ms_in_allocator_tag D1;
|
||||||
std::size_t n1 = size * boost::detail::array_total<T1>::size;
|
std::size_t n1 = size * boost::detail::array_total<T1>::size;
|
||||||
T1* p1 = 0;
|
T1* p1 = 0;
|
||||||
T2* p2 = 0;
|
T2* p2 = 0;
|
||||||
@ -155,7 +155,7 @@ namespace boost {
|
|||||||
typedef typename boost::detail::array_base<T1>::type T2;
|
typedef typename boost::detail::array_base<T1>::type T2;
|
||||||
typedef boost::detail::ms_noinit_tag R1;
|
typedef boost::detail::ms_noinit_tag R1;
|
||||||
typedef boost::detail::ms_allocator<T, R1, A> A1;
|
typedef boost::detail::ms_allocator<T, R1, A> A1;
|
||||||
typedef boost::detail::ms_noop D1;
|
typedef boost::detail::ms_in_allocator_tag D1;
|
||||||
enum {
|
enum {
|
||||||
N = boost::detail::array_total<T>::size
|
N = boost::detail::array_total<T>::size
|
||||||
};
|
};
|
||||||
|
@ -372,7 +372,7 @@ namespace boost {
|
|||||||
type* object;
|
type* object;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ms_noop {
|
class ms_in_allocator_tag {
|
||||||
public:
|
public:
|
||||||
void operator()(const void*) {
|
void operator()(const void*) {
|
||||||
}
|
}
|
||||||
|
@ -14,14 +14,13 @@
|
|||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
namespace detail {
|
namespace detail {
|
||||||
template<class P, class T_, class R_, class A_>
|
template<class P, class A>
|
||||||
class sp_counted_impl_pda<P, ms_noop, ms_allocator<T_, R_, A_> >
|
class sp_counted_impl_pda<P, ms_in_allocator_tag, A>
|
||||||
: public sp_counted_base {
|
: public sp_counted_base {
|
||||||
typedef ms_noop D;
|
typedef ms_in_allocator_tag D;
|
||||||
typedef ms_allocator<T_, R_, A_> A;
|
|
||||||
typedef sp_counted_impl_pda<P, D, A> Y;
|
typedef sp_counted_impl_pda<P, D, A> Y;
|
||||||
public:
|
public:
|
||||||
sp_counted_impl_pda(const P&, const D&, const A& allocator_)
|
sp_counted_impl_pda(P, const D&, const A& allocator_)
|
||||||
: allocator(allocator_) {
|
: allocator(allocator_) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ namespace boost {
|
|||||||
typedef typename boost::detail::array_base<T1>::type T2;
|
typedef typename boost::detail::array_base<T1>::type T2;
|
||||||
typedef boost::detail::ms_init_tag R1;
|
typedef boost::detail::ms_init_tag R1;
|
||||||
typedef boost::detail::ms_allocator<T, R1> A1;
|
typedef boost::detail::ms_allocator<T, R1> A1;
|
||||||
typedef boost::detail::ms_noop D1;
|
typedef boost::detail::ms_in_allocator_tag D1;
|
||||||
std::size_t n1 = size * boost::detail::array_total<T1>::size;
|
std::size_t n1 = size * boost::detail::array_total<T1>::size;
|
||||||
T1* p1 = 0;
|
T1* p1 = 0;
|
||||||
T2* p2 = 0;
|
T2* p2 = 0;
|
||||||
@ -41,7 +41,7 @@ namespace boost {
|
|||||||
typedef typename boost::detail::array_base<T1>::type T2;
|
typedef typename boost::detail::array_base<T1>::type T2;
|
||||||
typedef boost::detail::ms_init_tag R1;
|
typedef boost::detail::ms_init_tag R1;
|
||||||
typedef boost::detail::ms_allocator<T, R1> A1;
|
typedef boost::detail::ms_allocator<T, R1> A1;
|
||||||
typedef boost::detail::ms_noop D1;
|
typedef boost::detail::ms_in_allocator_tag D1;
|
||||||
enum {
|
enum {
|
||||||
N = boost::detail::array_total<T>::size
|
N = boost::detail::array_total<T>::size
|
||||||
};
|
};
|
||||||
@ -66,7 +66,7 @@ namespace boost {
|
|||||||
typedef const T2 T3;
|
typedef const T2 T3;
|
||||||
typedef boost::detail::ms_init_tag R1;
|
typedef boost::detail::ms_init_tag R1;
|
||||||
typedef boost::detail::ms_allocator<T, R1> A1;
|
typedef boost::detail::ms_allocator<T, R1> A1;
|
||||||
typedef boost::detail::ms_noop D1;
|
typedef boost::detail::ms_in_allocator_tag D1;
|
||||||
enum {
|
enum {
|
||||||
M = boost::detail::array_total<T1>::size
|
M = boost::detail::array_total<T1>::size
|
||||||
};
|
};
|
||||||
@ -92,7 +92,7 @@ namespace boost {
|
|||||||
typedef const T2 T3;
|
typedef const T2 T3;
|
||||||
typedef boost::detail::ms_init_tag R1;
|
typedef boost::detail::ms_init_tag R1;
|
||||||
typedef boost::detail::ms_allocator<T, R1> A1;
|
typedef boost::detail::ms_allocator<T, R1> A1;
|
||||||
typedef boost::detail::ms_noop D1;
|
typedef boost::detail::ms_in_allocator_tag D1;
|
||||||
enum {
|
enum {
|
||||||
M = boost::detail::array_total<T1>::size,
|
M = boost::detail::array_total<T1>::size,
|
||||||
N = boost::detail::array_total<T>::size
|
N = boost::detail::array_total<T>::size
|
||||||
@ -117,7 +117,7 @@ namespace boost {
|
|||||||
typedef typename boost::detail::array_base<T1>::type T2;
|
typedef typename boost::detail::array_base<T1>::type T2;
|
||||||
typedef boost::detail::ms_noinit_tag R1;
|
typedef boost::detail::ms_noinit_tag R1;
|
||||||
typedef boost::detail::ms_allocator<T, R1> A1;
|
typedef boost::detail::ms_allocator<T, R1> A1;
|
||||||
typedef boost::detail::ms_noop D1;
|
typedef boost::detail::ms_in_allocator_tag D1;
|
||||||
std::size_t n1 = size * boost::detail::array_total<T1>::size;
|
std::size_t n1 = size * boost::detail::array_total<T1>::size;
|
||||||
T1* p1 = 0;
|
T1* p1 = 0;
|
||||||
T2* p2 = 0;
|
T2* p2 = 0;
|
||||||
@ -138,7 +138,7 @@ namespace boost {
|
|||||||
typedef typename boost::detail::array_base<T1>::type T2;
|
typedef typename boost::detail::array_base<T1>::type T2;
|
||||||
typedef boost::detail::ms_noinit_tag R1;
|
typedef boost::detail::ms_noinit_tag R1;
|
||||||
typedef boost::detail::ms_allocator<T, R1> A1;
|
typedef boost::detail::ms_allocator<T, R1> A1;
|
||||||
typedef boost::detail::ms_noop D1;
|
typedef boost::detail::ms_in_allocator_tag D1;
|
||||||
enum {
|
enum {
|
||||||
N = boost::detail::array_total<T>::size
|
N = boost::detail::array_total<T>::size
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user