1 // { dg-do compile } 2 // { dg-additional-options "-Wno-return-type" } 3 4 namespace internal { 5 template < class DSC, bool Const > struct CC_iterator { 6 typedef CC_iterator iterator; 7 typedef typename DSC::value_type value_type; 8 typedef const value_type* pointer; 9 CC_iterator () ; CC_iteratorCC_iterator10 CC_iterator (const iterator &it) { 11 } 12 pointer p; 13 pointer operator->() const ; 14 }; 15 } 16 template < class T > struct Compact_container { 17 typedef Compact_container <T> Self; 18 typedef T value_type; 19 typedef internal::CC_iterator<Self, false> iterator; 20 }; 21 template < typename TDS = void > struct Periodic_3_triangulation_ds_cell_base_3 { 22 typedef typename TDS::Vertex_handle Vertex_handle; vertexPeriodic_3_triangulation_ds_cell_base_323 const Vertex_handle& vertex(int i) const { 24 } 25 }; 26 struct Triangulation_data_structure_3 { 27 typedef Triangulation_data_structure_3 Tds; 28 typedef Periodic_3_triangulation_ds_cell_base_3<Tds> Cell; 29 typedef Compact_container<Cell> Cell_range; 30 typedef Compact_container<int> Vertex_range; 31 typedef typename Cell_range::iterator Cell_handle; 32 typedef typename Vertex_range::iterator Vertex_handle; 33 }; 34 typedef Triangulation_data_structure_3 TDS1; 35 template < class > struct Periodic_3_Delaunay_triangulation_3 { 36 typedef TDS1::Vertex_handle Vertex_handle; 37 typedef TDS1::Cell_handle Cell_handle; compare_distancePeriodic_3_Delaunay_triangulation_338 int compare_distance() const { 39 } 40 Vertex_handle nearest_vertex() const; 41 }; nearest_vertex()42template < class Tds > typename Periodic_3_Delaunay_triangulation_3<Tds>::Vertex_handle Periodic_3_Delaunay_triangulation_3<Tds>::nearest_vertex() const { 43 Cell_handle c ; 44 Vertex_handle nearest = c->vertex(0); 45 nearest = (compare_distance() == -1) ? nearest : c->vertex(0); 46 return nearest; 47 } 48 typedef Periodic_3_Delaunay_triangulation_3<TDS1> PDT1; 49 struct Periodic_3_triangulation_hierarchy_3 : PDT1 { 50 Vertex_handle nearest_vertex() const; 51 }; nearest_vertex()52Periodic_3_triangulation_hierarchy_3::Vertex_handle Periodic_3_triangulation_hierarchy_3:: nearest_vertex() const { 53 return PDT1::nearest_vertex(); 54 } 55