← Back to team overview

dolfin team mailing list archive

Checking if shared_ptr is NULL

 

What is the correct way to check whether a shared_ptr is NULL?

The following seems to return true for a pointer that hasn't been initialized:

bool has_child() const
{
  return _child != 0;
}

(in Hierarchical.h)

--
Anders



Follow ups