| 1 |
// PR c++/80891 part 4 |
| 2 |
|
| 3 |
// ICE copying an augmented lookup during ADL |
| 4 |
|
| 5 |
struct __normal_iterator get(); // { dg-message "candidate .: .__normal_iterator get\\(\\)." } |
| 6 |
namespace boost { |
| 7 |
template <class> void get(); // { dg-message "candidate .: .template<class> void boost::get\\(\\)." } |
| 8 |
struct A { |
| 9 |
A(int); |
| 10 |
}; |
| 11 |
enum problem_selector { subgraph_iso }; |
| 12 |
template <typename, typename, typename, typename, |
| 13 |
typename SubGraphIsoMapCallback, problem_selector> |
| 14 |
struct B { |
| 15 |
B(A, A, int, int, int, int); |
| 16 |
void m_fn1(SubGraphIsoMapCallback p1) { |
| 17 |
__normal_iterator __trans_tmp_1(); // { dg-warning "empty parentheses" } |
| 18 |
p1(__trans_tmp_1, 0); |
| 19 |
} |
| 20 |
}; |
| 21 |
template <typename Graph1, typename Graph2, typename IndexMap1, |
| 22 |
typename IndexMap2, typename VertexOrder1, |
| 23 |
typename EdgeEquivalencePredicate, |
| 24 |
typename VertexEquivalencePredicate, typename SubGraphIsoMapCallback, |
| 25 |
problem_selector problem_selection> |
| 26 |
void match( |
| 27 |
Graph1, Graph2, SubGraphIsoMapCallback p3, VertexOrder1, |
| 28 |
B<IndexMap1, IndexMap2, EdgeEquivalencePredicate, |
| 29 |
VertexEquivalencePredicate, SubGraphIsoMapCallback, problem_selection> |
| 30 |
p5) { |
| 31 |
p5.m_fn1(p3); |
| 32 |
} |
| 33 |
template <problem_selector problem_selection, typename GraphSmall, |
| 34 |
typename GraphLarge, typename IndexMapSmall, typename IndexMapLarge, |
| 35 |
typename VertexOrderSmall, typename EdgeEquivalencePredicate, |
| 36 |
typename VertexEquivalencePredicate, typename SubGraphIsoMapCallback> |
| 37 |
void vf2_subgraph_morphism(GraphSmall, GraphLarge, SubGraphIsoMapCallback p3, |
| 38 |
IndexMapSmall, IndexMapLarge, VertexOrderSmall, |
| 39 |
EdgeEquivalencePredicate, |
| 40 |
VertexEquivalencePredicate) { |
| 41 |
B<IndexMapSmall, IndexMapLarge, EdgeEquivalencePredicate, |
| 42 |
VertexEquivalencePredicate, SubGraphIsoMapCallback, problem_selection> |
| 43 |
s(0, 0, 0, 0, 0, 0); |
| 44 |
match(0, 0, p3, 0, s); |
| 45 |
} |
| 46 |
template <typename GraphSmall, typename GraphLarge, typename IndexMapSmall, |
| 47 |
typename IndexMapLarge, typename VertexOrderSmall, |
| 48 |
typename EdgeEquivalencePredicate, |
| 49 |
typename VertexEquivalencePredicate, typename SubGraphIsoMapCallback> |
| 50 |
int vf2_subgraph_iso(GraphSmall, GraphLarge, SubGraphIsoMapCallback p3, |
| 51 |
IndexMapSmall, IndexMapLarge, VertexOrderSmall, |
| 52 |
EdgeEquivalencePredicate, VertexEquivalencePredicate) { |
| 53 |
vf2_subgraph_morphism<subgraph_iso>(0, 0, p3, 0, 0, 0, 0, 0); |
| 54 |
return 0; |
| 55 |
} |
| 56 |
} |
| 57 |
using namespace boost; |
| 58 |
struct C { |
| 59 |
C(int) : graph1_(0), graph2_(0) {} |
| 60 |
template <typename CorrespondenceMap1To2, typename CorrespondenceMap2To1> |
| 61 |
void operator()(CorrespondenceMap1To2 p1, CorrespondenceMap2To1) { |
| 62 |
get(p1); // { dg-error "no matching function" } |
| 63 |
} |
| 64 |
A graph1_; |
| 65 |
A graph2_; |
| 66 |
}; |
| 67 |
template <typename> void get(); // { dg-message "candidate .: .template<class> void get\\(\\)." } |
| 68 |
void test_vf2_sub_graph_iso() { C a(vf2_subgraph_iso(0, 0, a, 0, 0, 0, 0, 0)); |
| 69 |
} |