title: Is there a CGAL function to check whether holes are actually inside a polygon with holes or to to check whether a polygon with holes is valid?
body: <p>I am working with Polygon_with_holes_2. Unfortunately, it seems so that a Polygon_with_holes_2 accepts holes that lie outside the polygon too.</p>
  <p>Hence, I need to make sure all the holes are inside the outer boundary of the Polygon_with_holes_2.</p>
  <p>Is there any way to do this rather than simply checking whether each point of each holes lies within the polygon?</p>
  <p>I am currently using the following the following method to check whether a Polygon_with_holes_2 is valid or not. However, it seems a bit primitive.</p>
  <pre><code>bool is_valid_pwh(Polygon_with_holes pwh)
  {
  
    for (auto hi = pwh.holes_begin(); hi != pwh.holes_end(); ++hi) {
  
      for (auto point : *hi) {
  
        if (CGAL::oriented_side(point, pwh.outer_boundary()) != 1) {
  
            return false;
  
        }
  
      }
  
    }
  
    return true;
  
  }
  </code></pre>