//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));
}
//enable_if ...
void intrusive_make_unique(boost::intrusive_ptr<T> & p)
{
  assert(p);
  if (!p->unique())
    p.reset(intrusive_clone(*p));
}
// enable_if ...
typename boost::intrusive_ptr<T> intrusive_copy_on_write(boost::intrusive_ptr<T> const& p)
{
  assert(p);
  return p->unique() ? p : intrusive_clone(*p);
}