Make sp_counted_impl_ specialization more generic

This commit is contained in:
Glen Fernandes
2014-02-12 08:46:59 -08:00
parent 0337743c8c
commit 016af907bd
4 changed files with 17 additions and 18 deletions

View File

@ -20,7 +20,7 @@ namespace boost {
typedef typename boost::detail::array_base<T1>::type T2;
typedef boost::detail::ms_init_tag R1;
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;
T1* p1 = 0;
T2* p2 = 0;
@ -45,7 +45,7 @@ namespace boost {
typedef typename boost::detail::array_base<T1>::type T2;
typedef boost::detail::ms_init_tag R1;
typedef boost::detail::ms_allocator<T, R1, A> A1;
typedef boost::detail::ms_noop D1;
typedef boost::detail::ms_in_allocator_tag D1;
enum {
N = boost::detail::array_total<T>::size
};
@ -74,7 +74,7 @@ namespace boost {
typedef const T2 T3;
typedef boost::detail::ms_init_tag R1;
typedef boost::detail::ms_allocator<T, R1, A> A1;
typedef boost::detail::ms_noop D1;
typedef boost::detail::ms_in_allocator_tag D1;
enum {
M = boost::detail::array_total<T1>::size
};
@ -105,7 +105,7 @@ namespace boost {
typedef const T2 T3;
typedef boost::detail::ms_init_tag R1;
typedef boost::detail::ms_allocator<T, R1, A> A1;
typedef boost::detail::ms_noop D1;
typedef boost::detail::ms_in_allocator_tag D1;
enum {
N = boost::detail::array_total<T>::size,
M = boost::detail::array_total<T1>::size
@ -134,7 +134,7 @@ namespace boost {
typedef typename boost::detail::array_base<T1>::type T2;
typedef boost::detail::ms_noinit_tag R1;
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;
T1* p1 = 0;
T2* p2 = 0;
@ -155,7 +155,7 @@ namespace boost {
typedef typename boost::detail::array_base<T1>::type T2;
typedef boost::detail::ms_noinit_tag R1;
typedef boost::detail::ms_allocator<T, R1, A> A1;
typedef boost::detail::ms_noop D1;
typedef boost::detail::ms_in_allocator_tag D1;
enum {
N = boost::detail::array_total<T>::size
};

View File

@ -372,7 +372,7 @@ namespace boost {
type* object;
};
class ms_noop {
class ms_in_allocator_tag {
public:
void operator()(const void*) {
}

View File

@ -14,14 +14,13 @@
namespace boost {
namespace detail {
template<class P, class T_, class R_, class A_>
class sp_counted_impl_pda<P, ms_noop, ms_allocator<T_, R_, A_> >
template<class P, class A>
class sp_counted_impl_pda<P, ms_in_allocator_tag, A>
: public sp_counted_base {
typedef ms_noop D;
typedef ms_allocator<T_, R_, A_> A;
typedef ms_in_allocator_tag D;
typedef sp_counted_impl_pda<P, D, A> Y;
public:
sp_counted_impl_pda(const P&, const D&, const A& allocator_)
sp_counted_impl_pda(P, const D&, const A& allocator_)
: allocator(allocator_) {
}

View File

@ -20,7 +20,7 @@ namespace boost {
typedef typename boost::detail::array_base<T1>::type T2;
typedef boost::detail::ms_init_tag R1;
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;
T1* p1 = 0;
T2* p2 = 0;
@ -41,7 +41,7 @@ namespace boost {
typedef typename boost::detail::array_base<T1>::type T2;
typedef boost::detail::ms_init_tag R1;
typedef boost::detail::ms_allocator<T, R1> A1;
typedef boost::detail::ms_noop D1;
typedef boost::detail::ms_in_allocator_tag D1;
enum {
N = boost::detail::array_total<T>::size
};
@ -66,7 +66,7 @@ namespace boost {
typedef const T2 T3;
typedef boost::detail::ms_init_tag R1;
typedef boost::detail::ms_allocator<T, R1> A1;
typedef boost::detail::ms_noop D1;
typedef boost::detail::ms_in_allocator_tag D1;
enum {
M = boost::detail::array_total<T1>::size
};
@ -92,7 +92,7 @@ namespace boost {
typedef const T2 T3;
typedef boost::detail::ms_init_tag R1;
typedef boost::detail::ms_allocator<T, R1> A1;
typedef boost::detail::ms_noop D1;
typedef boost::detail::ms_in_allocator_tag D1;
enum {
M = boost::detail::array_total<T1>::size,
N = boost::detail::array_total<T>::size
@ -117,7 +117,7 @@ namespace boost {
typedef typename boost::detail::array_base<T1>::type T2;
typedef boost::detail::ms_noinit_tag R1;
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;
T1* p1 = 0;
T2* p2 = 0;
@ -138,7 +138,7 @@ namespace boost {
typedef typename boost::detail::array_base<T1>::type T2;
typedef boost::detail::ms_noinit_tag R1;
typedef boost::detail::ms_allocator<T, R1> A1;
typedef boost::detail::ms_noop D1;
typedef boost::detail::ms_in_allocator_tag D1;
enum {
N = boost::detail::array_total<T>::size
};