This is a combination of two bugs: the call to next should pick up CGAL::next to begin with and even if it didn't iterator_traits should arguably be SFINAE friendly. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40497 We fix this by fully qualifying the call on the affected compiler. To make this work we have to partially break the dependency between CGAL/boost/graph/iterator.h and CGAL/boost/graph/graph_traits_Surface_mesh.h