annotate gcc/testsuite/g++.dg/torture/pr47313.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 // { dg-do compile }
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
2 // { dg-additional-options "-Wno-return-type" }
111
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 namespace internal {
kono
parents:
diff changeset
5 template < class DSC, bool Const > struct CC_iterator {
kono
parents:
diff changeset
6 typedef CC_iterator iterator;
kono
parents:
diff changeset
7 typedef typename DSC::value_type value_type;
kono
parents:
diff changeset
8 typedef const value_type* pointer;
kono
parents:
diff changeset
9 CC_iterator () ;
kono
parents:
diff changeset
10 CC_iterator (const iterator &it) {
kono
parents:
diff changeset
11 }
kono
parents:
diff changeset
12 pointer p;
kono
parents:
diff changeset
13 pointer operator->() const ;
kono
parents:
diff changeset
14 };
kono
parents:
diff changeset
15 }
kono
parents:
diff changeset
16 template < class T > struct Compact_container {
kono
parents:
diff changeset
17 typedef Compact_container <T> Self;
kono
parents:
diff changeset
18 typedef T value_type;
kono
parents:
diff changeset
19 typedef internal::CC_iterator<Self, false> iterator;
kono
parents:
diff changeset
20 };
kono
parents:
diff changeset
21 template < typename TDS = void > struct Periodic_3_triangulation_ds_cell_base_3 {
kono
parents:
diff changeset
22 typedef typename TDS::Vertex_handle Vertex_handle;
kono
parents:
diff changeset
23 const Vertex_handle& vertex(int i) const {
kono
parents:
diff changeset
24 }
kono
parents:
diff changeset
25 };
kono
parents:
diff changeset
26 struct Triangulation_data_structure_3 {
kono
parents:
diff changeset
27 typedef Triangulation_data_structure_3 Tds;
kono
parents:
diff changeset
28 typedef Periodic_3_triangulation_ds_cell_base_3<Tds> Cell;
kono
parents:
diff changeset
29 typedef Compact_container<Cell> Cell_range;
kono
parents:
diff changeset
30 typedef Compact_container<int> Vertex_range;
kono
parents:
diff changeset
31 typedef typename Cell_range::iterator Cell_handle;
kono
parents:
diff changeset
32 typedef typename Vertex_range::iterator Vertex_handle;
kono
parents:
diff changeset
33 };
kono
parents:
diff changeset
34 typedef Triangulation_data_structure_3 TDS1;
kono
parents:
diff changeset
35 template < class > struct Periodic_3_Delaunay_triangulation_3 {
kono
parents:
diff changeset
36 typedef TDS1::Vertex_handle Vertex_handle;
kono
parents:
diff changeset
37 typedef TDS1::Cell_handle Cell_handle;
kono
parents:
diff changeset
38 int compare_distance() const {
kono
parents:
diff changeset
39 }
kono
parents:
diff changeset
40 Vertex_handle nearest_vertex() const;
kono
parents:
diff changeset
41 };
kono
parents:
diff changeset
42 template < class Tds > typename Periodic_3_Delaunay_triangulation_3<Tds>::Vertex_handle Periodic_3_Delaunay_triangulation_3<Tds>::nearest_vertex() const {
kono
parents:
diff changeset
43 Cell_handle c ;
kono
parents:
diff changeset
44 Vertex_handle nearest = c->vertex(0);
kono
parents:
diff changeset
45 nearest = (compare_distance() == -1) ? nearest : c->vertex(0);
kono
parents:
diff changeset
46 return nearest;
kono
parents:
diff changeset
47 }
kono
parents:
diff changeset
48 typedef Periodic_3_Delaunay_triangulation_3<TDS1> PDT1;
kono
parents:
diff changeset
49 struct Periodic_3_triangulation_hierarchy_3 : PDT1 {
kono
parents:
diff changeset
50 Vertex_handle nearest_vertex() const;
kono
parents:
diff changeset
51 };
kono
parents:
diff changeset
52 Periodic_3_triangulation_hierarchy_3::Vertex_handle Periodic_3_triangulation_hierarchy_3:: nearest_vertex() const {
kono
parents:
diff changeset
53 return PDT1::nearest_vertex();
kono
parents:
diff changeset
54 }