//typename boost::enable_if<typename intrusive_traits<T>::user_allocator>::type
void
intrusive_make_valid_unique(boost::intrusive_ptr<T> & p)
{
  if (!p)
    p.reset(construct<typename intrusive_traits<T>::user_allocator,T>());
  else if (!p->unique())
    p.reset(intrusive_clone(*p));
}
예제 #2
0
 inline void load(Archive& ar, boost::intrusive_ptr<T>& t,
     const unsigned int)
 {
     // The most common cause of trapping here would be serializing
     // something like intrusive_ptr<int>.  This occurs because int
     // is never tracked by default.  Wrap int in a trackable type
     BOOST_STATIC_ASSERT((tracking_level<T>::value != track_never));
     T* ptr;
     ar >> ptr;
     t.reset(ptr);
 }
//enable_if ...
void intrusive_make_unique(boost::intrusive_ptr<T> & p)
{
  assert(p);
  if (!p->unique())
    p.reset(intrusive_clone(*p));
}
예제 #4
0
	MyIndexIterForward(const SeqNumIndex* owner) {
		m_index.reset(const_cast<SeqNumIndex*>(owner));
		m_curr = 0;
	}
예제 #5
0
	MyIndexIterBackward(const SeqNumIndex* owner) {
		m_index.reset(const_cast<SeqNumIndex*>(owner));
		m_curr = owner->m_cnt;
	}