1 // RUN: %clang_cc1 -fsyntax-only %s -std=c++11 2>&1 | FileCheck %s -check-prefix=CHECK-ELIDE-NOTREE 2 // RUN: %clang_cc1 -fsyntax-only %s -fno-elide-type -std=c++11 2>&1 | FileCheck %s -check-prefix=CHECK-NOELIDE-NOTREE 3 // RUN: %clang_cc1 -fsyntax-only %s -fdiagnostics-show-template-tree -std=c++11 2>&1 | FileCheck %s -check-prefix=CHECK-ELIDE-TREE 4 // RUN: %clang_cc1 -fsyntax-only %s -fno-elide-type -fdiagnostics-show-template-tree -std=c++11 2>&1 | FileCheck %s -check-prefix=CHECK-NOELIDE-TREE 5 6 // PR9548 - "no known conversion from 'vector<string>' to 'vector<string>'" 7 // vector<string> refers to two different types here. Make sure the message 8 // gives a way to tell them apart. 9 class versa_string; 10 typedef versa_string string; 11 12 namespace std {template <typename T> class vector;} 13 using std::vector; 14 15 void f(vector<string> v); 16 17 namespace std { 18 class basic_string; 19 typedef basic_string string; 20 template <typename T> class vector {}; 21 void g() { 22 vector<string> v; 23 f(v); 24 } 25 } // end namespace std 26 // CHECK-ELIDE-NOTREE: no matching function for call to 'f' 27 // CHECK-ELIDE-NOTREE: candidate function not viable: no known conversion from 'vector<class std::basic_string>' to 'vector<class versa_string>' for 1st argument 28 // CHECK-NOELIDE-NOTREE: no matching function for call to 'f' 29 // CHECK-NOELIDE-NOTREE: candidate function not viable: no known conversion from 'vector<class std::basic_string>' to 'vector<class versa_string>' for 1st argument 30 // CHECK-ELIDE-TREE: no matching function for call to 'f' 31 // CHECK-ELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 32 // CHECK-ELIDE-TREE: vector< 33 // CHECK-ELIDE-TREE: [class std::basic_string != class versa_string]> 34 // CHECK-NOELIDE-TREE: no matching function for call to 'f' 35 // CHECK-NOELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 36 // CHECK-NOELIDE-TREE: vector< 37 // CHECK-NOELIDE-TREE: [class std::basic_string != class versa_string]> 38 39 template <int... A> 40 class I1{}; 41 void set1(I1<1,2,3,4,2,3,4,3>) {}; 42 void test1() { 43 set1(I1<1,2,3,4,2,2,4,3,7>()); 44 } 45 // CHECK-ELIDE-NOTREE: no matching function for call to 'set1' 46 // CHECK-ELIDE-NOTREE: candidate function not viable: no known conversion from 'I1<[5 * ...], 2, [2 * ...], 7>' to 'I1<[5 * ...], 3, [2 * ...], (no argument)>' for 1st argument 47 // CHECK-NOELIDE-NOTREE: no matching function for call to 'set1' 48 // CHECK-NOELIDE-NOTREE: candidate function not viable: no known conversion from 'I1<1, 2, 3, 4, 2, 2, 4, 3, 7>' to 'I1<1, 2, 3, 4, 2, 3, 4, 3, (no argument)>' for 1st argument 49 // CHECK-ELIDE-TREE: no matching function for call to 'set1' 50 // CHECK-ELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 51 // CHECK-ELIDE-TREE: I1< 52 // CHECK-ELIDE-TREE: [5 * ...], 53 // CHECK-ELIDE-TREE: [2 != 3], 54 // CHECK-ELIDE-TREE: [2 * ...], 55 // CHECK-ELIDE-TREE: [7 != (no argument)]> 56 // CHECK-NOELIDE-TREE: no matching function for call to 'set1' 57 // CHECK-NOELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 58 // CHECK-NOELIDE-TREE: I1< 59 // CHECK-NOELIDE-TREE: 1, 60 // CHECK-NOELIDE-TREE: 2, 61 // CHECK-NOELIDE-TREE: 3, 62 // CHECK-NOELIDE-TREE: 4, 63 // CHECK-NOELIDE-TREE: 2, 64 // CHECK-NOELIDE-TREE: [2 != 3], 65 // CHECK-NOELIDE-TREE: 4, 66 // CHECK-NOELIDE-TREE: 3, 67 // CHECK-NOELIDE-TREE: [7 != (no argument)]> 68 69 template <class A, class B, class C = void> 70 class I2{}; 71 void set2(I2<int, int>) {}; 72 void test2() { 73 set2(I2<double, int, int>()); 74 } 75 // CHECK-ELIDE-NOTREE: no matching function for call to 'set2' 76 // CHECK-ELIDE-NOTREE: candidate function not viable: no known conversion from 'I2<double, [...], int>' to 'I2<int, [...], (default) void>' for 1st argument 77 // CHECK-NOELIDE-NOTREE: no matching function for call to 'set2' 78 // CHECK-NOELIDE-NOTREE: candidate function not viable: no known conversion from 'I2<double, int, int>' to 'I2<int, int, (default) void>' for 1st argument 79 // CHECK-ELIDE-TREE: no matching function for call to 'set2' 80 // CHECK-ELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 81 // CHECK-ELIDE-TREE: I2< 82 // CHECK-ELIDE-TREE: [double != int], 83 // CHECK-ELIDE-TREE: [...], 84 // CHECK-ELIDE-TREE: [int != (default) void]> 85 // CHECK-NOELIDE-TREE: no matching function for call to 'set2' 86 // CHECK-NOELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 87 // CHECK-NOELIDE-TREE: I2< 88 // CHECK-NOELIDE-TREE: [double != int], 89 // CHECK-NOELIDE-TREE: int, 90 // CHECK-NOELIDE-TREE: [int != (default) void]> 91 92 int V1, V2, V3; 93 template <int* A, int *B> 94 class I3{}; 95 void set3(I3<&V1, &V2>) {}; 96 void test3() { 97 set3(I3<&V3, &V2>()); 98 } 99 // CHECK-ELIDE-NOTREE: no matching function for call to 'set3' 100 // CHECK-ELIDE-NOTREE: candidate function not viable: no known conversion from 'I3<&V3, [...]>' to 'I3<&V1, [...]>' for 1st argument 101 // CHECK-NOELIDE-NOTREE: no matching function for call to 'set3' 102 // CHECK-NOELIDE-NOTREE: candidate function not viable: no known conversion from 'I3<&V3, &V2>' to 'I3<&V1, &V2>' for 1st argument 103 // CHECK-ELIDE-TREE: no matching function for call to 'set3' 104 // CHECK-ELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 105 // CHECK-ELIDE-TREE: I3< 106 // CHECK-ELIDE-TREE: [&V3 != &V1] 107 // CHECK-ELIDE-TREE: [...]> 108 // CHECK-NOELIDE-TREE: no matching function for call to 'set3' 109 // CHECK-NOELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 110 // CHECK-NOELIDE-TREE: I3< 111 // CHECK-NOELIDE-TREE: [&V3 != &V1] 112 // CHECK-NOELIDE-TREE: &V2> 113 114 template <class A, class B> 115 class Alpha{}; 116 template <class A, class B> 117 class Beta{}; 118 template <class A, class B> 119 class Gamma{}; 120 template <class A, class B> 121 class Delta{}; 122 123 void set4(Alpha<int, int>); 124 void test4() { 125 set4(Beta<void, void>()); 126 } 127 // CHECK-ELIDE-NOTREE: no matching function for call to 'set4' 128 // CHECK-ELIDE-NOTREE: candidate function not viable: no known conversion from 'Beta<void, void>' to 'Alpha<int, int>' for 1st argument 129 // CHECK-NOELIDE-NOTREE: no matching function for call to 'set4' 130 // CHECK-NOELIDE-NOTREE: candidate function not viable: no known conversion from 'Beta<void, void>' to 'Alpha<int, int>' for 1st argument 131 // CHECK-ELIDE-TREE: no matching function for call to 'set4' 132 // CHECK-ELIDE-TREE: candidate function not viable: no known conversion from 'Beta<void, void>' to 'Alpha<int, int>' for 1st argument 133 // CHECK-NOELIDE-TREE: no matching function for call to 'set4' 134 // CHECK-NOELIDE-TREE: candidate function not viable: no known conversion from 'Beta<void, void>' to 'Alpha<int, int>' for 1st argument 135 136 void set5(Alpha<Beta<Gamma<Delta<int, int>, int>, int>, int>); 137 void test5() { 138 set5(Alpha<Beta<Gamma<void, void>, double>, double>()); 139 } 140 // CHECK-ELIDE-NOTREE: no matching function for call to 'set5' 141 // CHECK-ELIDE-NOTREE: candidate function not viable: no known conversion from 'Alpha<Beta<Gamma<void, void>, double>, double>' to 'Alpha<Beta<Gamma<Delta<int, int>, int>, int>, int>' for 1st argument 142 // CHECK-NOELIDE-NOTREE: no matching function for call to 'set5' 143 // CHECK-NOELIDE-NOTREE: candidate function not viable: no known conversion from 'Alpha<Beta<Gamma<void, void>, double>, double>' to 'Alpha<Beta<Gamma<Delta<int, int>, int>, int>, int>' for 1st argument 144 // CHECK-ELIDE-TREE: no matching function for call to 'set5' 145 // CHECK-ELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 146 // CHECK-ELIDE-TREE: Alpha< 147 // CHECK-ELIDE-TREE: Beta< 148 // CHECK-ELIDE-TREE: Gamma< 149 // CHECK-ELIDE-TREE: [void != Delta<int, int>], 150 // CHECK-ELIDE-TREE: [void != int]> 151 // CHECK-ELIDE-TREE: [double != int]> 152 // CHECK-ELIDE-TREE: [double != int]> 153 // CHECK-NOELIDE-TREE: no matching function for call to 'set5' 154 // CHECK-NOELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 155 // CHECK-NOELIDE-TREE: Alpha< 156 // CHECK-NOELIDE-TREE: Beta< 157 // CHECK-NOELIDE-TREE: Gamma< 158 // CHECK-NOELIDE-TREE: [void != Delta<int, int>], 159 // CHECK-NOELIDE-TREE: [void != int]> 160 // CHECK-NOELIDE-TREE: [double != int]> 161 // CHECK-NOELIDE-TREE: [double != int]> 162 163 void test6() { 164 set5(Alpha<Beta<Delta<int, int>, int>, int>()); 165 } 166 // CHECK-ELIDE-NOTREE: no matching function for call to 'set5' 167 // CHECK-ELIDE-NOTREE: candidate function not viable: no known conversion from 'Alpha<Beta<Delta<int, int>, [...]>, [...]>' to 'Alpha<Beta<Gamma<Delta<int, int>, int>, [...]>, [...]>' for 1st argument 168 // CHECK-NOELIDE-NOTREE: no matching function for call to 'set5' 169 // CHECK-NOELIDE-NOTREE: candidate function not viable: no known conversion from 'Alpha<Beta<Delta<int, int>, int>, int>' to 'Alpha<Beta<Gamma<Delta<int, int>, int>, int>, int>' for 1st argument 170 // CHECK-ELIDE-TREE: no matching function for call to 'set5' 171 // CHECK-ELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 172 // CHECK-ELIDE-TREE: Alpha< 173 // CHECK-ELIDE-TREE: Beta< 174 // CHECK-ELIDE-TREE: [Delta<int, int> != Gamma<Delta<int, int>, int>], 175 // CHECK-ELIDE-TREE: [...]> 176 // CHECK-ELIDE-TREE: [...]> 177 // CHECK-NOELIDE-TREE: no matching function for call to 'set5' 178 // CHECK-NOELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 179 // CHECK-NOELIDE-TREE: Alpha< 180 // CHECK-NOELIDE-TREE: Beta< 181 // CHECK-NOELIDE-TREE: [Delta<int, int> != Gamma<Delta<int, int>, int>], 182 // CHECK-NOELIDE-TREE: int> 183 // CHECK-NOELIDE-TREE: int> 184 185 int a7, b7; 186 int c7[] = {1,2,3}; 187 template<int *A> 188 class class7 {}; 189 void set7(class7<&a7> A) {} 190 void test7() { 191 set7(class7<&a7>()); 192 set7(class7<&b7>()); 193 set7(class7<c7>()); 194 set7(class7<nullptr>()); 195 } 196 // CHECK-ELIDE-NOTREE: no matching function for call to 'set7' 197 // CHECK-ELIDE-NOTREE: candidate function not viable: no known conversion from 'class7<&b7>' to 'class7<&a7>' for 1st argument 198 // CHECK-ELIDE-NOTREE: no matching function for call to 'set7' 199 // CHECK-ELIDE-NOTREE: candidate function not viable: no known conversion from 'class7<c7>' to 'class7<&a7>' for 1st argument 200 // CHECK-ELIDE-NOTREE: no matching function for call to 'set7' 201 // CHECK-ELIDE-NOTREE: candidate function not viable: no known conversion from 'class7<nullptr>' to 'class7<&a7>' for 1st argument 202 // CHECK-NOELIDE-NOTREE: no matching function for call to 'set7' 203 // CHECK-NOELIDE-NOTREE: candidate function not viable: no known conversion from 'class7<&b7>' to 'class7<&a7>' for 1st argument 204 // CHECK-NOELIDE-NOTREE: no matching function for call to 'set7' 205 // CHECK-NOELIDE-NOTREE: candidate function not viable: no known conversion from 'class7<c7>' to 'class7<&a7>' for 1st argument 206 // CHECK-NOELIDE-NOTREE: no matching function for call to 'set7' 207 // CHECK-NOELIDE-NOTREE: candidate function not viable: no known conversion from 'class7<nullptr>' to 'class7<&a7>' for 1st argument 208 // CHECK-ELIDE-TREE: no matching function for call to 'set7' 209 // CHECK-ELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 210 // CHECK-ELIDE-TREE: class7< 211 // CHECK-ELIDE-TREE: [&b7 != &a7]> 212 // CHECK-ELIDE-TREE: no matching function for call to 'set7' 213 // CHECK-ELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 214 // CHECK-ELIDE-TREE: class7< 215 // CHECK-ELIDE-TREE: [c7 != &a7]> 216 // CHECK-ELIDE-TREE: no matching function for call to 'set7' 217 // CHECK-ELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 218 // CHECK-ELIDE-TREE: class7< 219 // CHECK-ELIDE-TREE: [nullptr != &a7]> 220 // CHECK-NOELIDE-TREE: no matching function for call to 'set7' 221 // CHECK-NOELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 222 // CHECK-NOELIDE-TREE: class7< 223 // CHECK-NOELIDE-TREE: [&b7 != &a7]> 224 // CHECK-NOELIDE-TREE: no matching function for call to 'set7' 225 // CHECK-NOELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 226 // CHECK-NOELIDE-TREE: class7< 227 // CHECK-NOELIDE-TREE: [c7 != &a7]> 228 // CHECK-NOELIDE-TREE: no matching function for call to 'set7' 229 // CHECK-NOELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 230 // CHECK-NOELIDE-TREE: class7< 231 // CHECK-NOELIDE-TREE: [nullptr != &a7]> 232 233 template<typename ...T> struct S8 {}; 234 template<typename T> using U8 = S8<int, char, T>; 235 int f8(S8<int, char, double>); 236 int k8 = f8(U8<char>()); 237 // CHECK-ELIDE-NOTREE: no matching function for call to 'f8' 238 // CHECK-ELIDE-NOTREE: candidate function not viable: no known conversion from 'S8<[2 * ...], char>' to 'S8<[2 * ...], double>' for 1st argument 239 // CHECK-NOELIDE-NOTREE: no matching function for call to 'f8' 240 // CHECK-NOELIDE-NOTREE: candidate function not viable: no known conversion from 'S8<int, char, char>' to 'S8<int, char, double>' for 1st argument 241 // CHECK-ELIDE-TREE: no matching function for call to 'f8' 242 // CHECK-ELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 243 // CHECK-ELIDE-TREE: S8< 244 // CHECK-ELIDE-TREE: [2 * ...], 245 // CHECK-ELIDE-TREE: [char != double]> 246 // CHECK-NOELIDE-TREE: no matching function for call to 'f8' 247 // CHECK-NOELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 248 // CHECK-NOELIDE-TREE: S8< 249 // CHECK-NOELIDE-TREE: int, 250 // CHECK-NOELIDE-TREE: char, 251 // CHECK-NOELIDE-TREE: [char != double]> 252 253 template<typename ...T> struct S9 {}; 254 template<typename T> using U9 = S9<int, char, T>; 255 template<typename T> using V9 = U9<U9<T>>; 256 int f9(S9<int, char, U9<const double>>); 257 int k9 = f9(V9<double>()); 258 259 // CHECK-ELIDE-NOTREE: no matching function for call to 'f9' 260 // CHECK-ELIDE-NOTREE: candidate function not viable: no known conversion from 'S9<[2 * ...], S9<[2 * ...], double>>' to 'S9<[2 * ...], S9<[2 * ...], const double>>' for 1st argument 261 // CHECK-NOELIDE-NOTREE: no matching function for call to 'f9' 262 // CHECK-NOELIDE-NOTREE: candidate function not viable: no known conversion from 'S9<int, char, S9<int, char, double>>' to 'S9<int, char, S9<int, char, const double>>' for 1st argument 263 // CHECK-ELIDE-TREE: no matching function for call to 'f9' 264 // CHECK-ELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 265 // CHECK-ELIDE-TREE: S9< 266 // CHECK-ELIDE-TREE: [2 * ...], 267 // CHECK-ELIDE-TREE: S9< 268 // CHECK-ELIDE-TREE: [2 * ...], 269 // CHECK-ELIDE-TREE: [double != const double]>> 270 // CHECK-NOELIDE-TREE: no matching function for call to 'f9' 271 // CHECK-NOELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 272 // CHECK-NOELIDE-TREE: S9< 273 // CHECK-NOELIDE-TREE: int, 274 // CHECK-NOELIDE-TREE: char, 275 // CHECK-NOELIDE-TREE: S9< 276 // CHECK-NOELIDE-TREE: int, 277 // CHECK-NOELIDE-TREE: char, 278 // CHECK-NOELIDE-TREE: [double != const double]>> 279 280 template<typename ...A> class class_types {}; 281 void set10(class_types<int, int>) {} 282 void test10() { 283 set10(class_types<int>()); 284 set10(class_types<int, int, int>()); 285 } 286 287 // CHECK-ELIDE-NOTREE: no matching function for call to 'set10' 288 // CHECK-ELIDE-NOTREE: candidate function not viable: no known conversion from 'class_types<[...], (no argument)>' to 'class_types<[...], int>' for 1st argument 289 // CHECK-ELIDE-NOTREE: no matching function for call to 'set10' 290 // CHECK-ELIDE-NOTREE: candidate function not viable: no known conversion from 'class_types<[2 * ...], int>' to 'class_types<[2 * ...], (no argument)>' for 1st argument 291 // CHECK-NOELIDE-NOTREE: no matching function for call to 'set10' 292 // CHECK-NOELIDE-NOTREE: candidate function not viable: no known conversion from 'class_types<int, (no argument)>' to 'class_types<int, int>' for 1st argument 293 // CHECK-NOELIDE-NOTREE: no matching function for call to 'set10' 294 // CHECK-NOELIDE-NOTREE: candidate function not viable: no known conversion from 'class_types<int, int, int>' to 'class_types<int, int, (no argument)>' for 1st argument 295 // CHECK-ELIDE-TREE: no matching function for call to 'set10' 296 // CHECK-ELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 297 // CHECK-ELIDE-TREE: class_types< 298 // CHECK-ELIDE-TREE: [...], 299 // CHECK-ELIDE-TREE: [(no argument) != int]> 300 // CHECK-ELIDE-TREE: no matching function for call to 'set10' 301 // CHECK-ELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 302 // CHECK-ELIDE-TREE: class_types< 303 // CHECK-ELIDE-TREE: [2 * ...], 304 // CHECK-ELIDE-TREE: [int != (no argument)]> 305 // CHECK-NOELIDE-TREE: no matching function for call to 'set10' 306 // CHECK-NOELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 307 // CHECK-NOELIDE-TREE: class_types< 308 // CHECK-NOELIDE-TREE: int, 309 // CHECK-NOELIDE-TREE: [(no argument) != int]> 310 // CHECK-NOELIDE-TREE: no matching function for call to 'set10' 311 // CHECK-NOELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 312 // CHECK-NOELIDE-TREE: class_types< 313 // CHECK-NOELIDE-TREE: int, 314 // CHECK-NOELIDE-TREE: int, 315 // CHECK-NOELIDE-TREE: [int != (no argument)]> 316 317 template<int ...A> class class_ints {}; 318 void set11(class_ints<2, 3>) {} 319 void test11() { 320 set11(class_ints<1>()); 321 set11(class_ints<0, 3, 6>()); 322 } 323 // CHECK-ELIDE-NOTREE: no matching function for call to 'set11' 324 // CHECK-ELIDE-NOTREE: candidate function not viable: no known conversion from 'class_ints<1, (no argument)>' to 'class_ints<2, 3>' for 1st argument 325 // CHECK-ELIDE-NOTREE: no matching function for call to 'set11' 326 // CHECK-ELIDE-NOTREE: candidate function not viable: no known conversion from 'class_ints<0, [...], 6>' to 'class_ints<2, [...], (no argument)>' for 1st argument 327 // CHECK-NOELIDE-NOTREE: no matching function for call to 'set11' 328 // CHECK-NOELIDE-NOTREE: candidate function not viable: no known conversion from 'class_ints<1, (no argument)>' to 'class_ints<2, 3>' for 1st argument 329 // CHECK-NOELIDE-NOTREE: no matching function for call to 'set11' 330 // CHECK-NOELIDE-NOTREE: candidate function not viable: no known conversion from 'class_ints<0, 3, 6>' to 'class_ints<2, 3, (no argument)>' for 1st argument 331 // CHECK-ELIDE-TREE: no matching function for call to 'set11' 332 // CHECK-ELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 333 // CHECK-ELIDE-TREE: class_ints< 334 // CHECK-ELIDE-TREE: [1 != 2], 335 // CHECK-ELIDE-TREE: [(no argument) != 3]> 336 // CHECK-ELIDE-TREE: no matching function for call to 'set11' 337 // CHECK-ELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 338 // CHECK-ELIDE-TREE: class_ints< 339 // CHECK-ELIDE-TREE: [0 != 2], 340 // CHECK-ELIDE-TREE: [...], 341 // CHECK-ELIDE-TREE: [6 != (no argument)]> 342 // CHECK-NOELIDE-TREE: no matching function for call to 'set11' 343 // CHECK-NOELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 344 // CHECK-NOELIDE-TREE: class_ints< 345 // CHECK-NOELIDE-TREE: [1 != 2], 346 // CHECK-NOELIDE-TREE: [(no argument) != 3]> 347 // CHECK-NOELIDE-TREE: no matching function for call to 'set11' 348 // CHECK-NOELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 349 // CHECK-NOELIDE-TREE: class_ints< 350 // CHECK-NOELIDE-TREE: [0 != 2], 351 // CHECK-NOELIDE-TREE: 3, 352 // CHECK-NOELIDE-TREE: [6 != (no argument)]> 353 354 template<template<class> class ...A> class class_template_templates {}; 355 template<class> class tt1 {}; 356 template<class> class tt2 {}; 357 void set12(class_template_templates<tt1, tt1>) {} 358 void test12() { 359 set12(class_template_templates<tt2>()); 360 set12(class_template_templates<tt1, tt1, tt1>()); 361 } 362 // CHECK-ELIDE-NOTREE: no matching function for call to 'set12' 363 // CHECK-ELIDE-NOTREE: candidate function not viable: no known conversion from 'class_template_templates<template tt2, template (no argument)>' to 'class_template_templates<template tt1, template tt1>' for 1st argument 364 // CHECK-ELIDE-NOTREE: no matching function for call to 'set12' 365 // CHECK-ELIDE-NOTREE: candidate function not viable: no known conversion from 'class_template_templates<[2 * ...], template tt1>' to 'class_template_templates<[2 * ...], template (no argument)>' for 1st argument 366 // CHECK-NOELIDE-NOTREE: no matching function for call to 'set12' 367 // CHECK-NOELIDE-NOTREE: candidate function not viable: no known conversion from 'class_template_templates<template tt2, template (no argument)>' to 'class_template_templates<template tt1, template tt1>' for 1st argument 368 // CHECK-NOELIDE-NOTREE: no matching function for call to 'set12' 369 // CHECK-NOELIDE-NOTREE: candidate function not viable: no known conversion from 'class_template_templates<template tt1, template tt1, template tt1>' to 'class_template_templates<template tt1, template tt1, template (no argument)>' for 1st argument 370 // CHECK-ELIDE-TREE: no matching function for call to 'set12' 371 // CHECK-ELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 372 // CHECK-ELIDE-TREE: class_template_templates< 373 // CHECK-ELIDE-TREE: [template tt2 != template tt1], 374 // CHECK-ELIDE-TREE: [template (no argument) != template tt1]> 375 // CHECK-ELIDE-TREE: no matching function for call to 'set12' 376 // CHECK-ELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 377 // CHECK-ELIDE-TREE: class_template_templates< 378 // CHECK-ELIDE-TREE: [2 * ...], 379 // CHECK-ELIDE-TREE: [template tt1 != template (no argument)]> 380 // CHECK-NOELIDE-TREE: no matching function for call to 'set12' 381 // CHECK-NOELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 382 // CHECK-NOELIDE-TREE: class_template_templates< 383 // CHECK-NOELIDE-TREE: [template tt2 != template tt1], 384 // CHECK-NOELIDE-TREE: [template (no argument) != template tt1]> 385 // CHECK-NOELIDE-TREE: no matching function for call to 'set12' 386 // CHECK-NOELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 387 // CHECK-NOELIDE-TREE: class_template_templates< 388 // CHECK-NOELIDE-TREE: template tt1, 389 // CHECK-NOELIDE-TREE: template tt1, 390 // CHECK-NOELIDE-TREE: [template tt1 != template (no argument)]> 391 392 double a13, b13, c13, d13; 393 template<double* ...A> class class_ptrs {}; 394 void set13(class_ptrs<&a13, &b13>) {} 395 void test13() { 396 set13(class_ptrs<&c13>()); 397 set13(class_ptrss<&a13, &b13, &d13>()); 398 } 399 // CHECK-ELIDE-NOTREE: no matching function for call to 'set13' 400 // CHECK-ELIDE-NOTREE: candidate function not viable: no known conversion from 'class_ptrs<&c13, (no argument)>' to 'class_ptrs<&a13, &b13>' for 1st argument 401 // CHECK-ELIDE-NOTREE: no matching function for call to 'set13' 402 // CHECK-ELIDE-NOTREE: candidate function not viable: no known conversion from 'class_ptrs<[2 * ...], &d13>' to 'class_ptrs<[2 * ...], (no argument)>' for 1st argument 403 // CHECK-NOELIDE-NOTREE: no matching function for call to 'set13' 404 // CHECK-NOELIDE-NOTREE: candidate function not viable: no known conversion from 'class_ptrs<&c13, (no argument)>' to 'class_ptrs<&a13, &b13>' for 1st argument 405 // CHECK-NOELIDE-NOTREE: no matching function for call to 'set13' 406 // CHECK-NOELIDE-NOTREE: candidate function not viable: no known conversion from 'class_ptrs<&a13, &b13, &d13>' to 'class_ptrs<&a13, &b13, (no argument)>' for 1st argument 407 // CHECK-ELIDE-TREE: no matching function for call to 'set13' 408 // CHECK-ELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 409 // CHECK-ELIDE-TREE: class_ptrs< 410 // CHECK-ELIDE-TREE: [&c13 != &a13], 411 // CHECK-ELIDE-TREE: [(no argument) != &b13]> 412 // CHECK-ELIDE-TREE: no matching function for call to 'set13' 413 // CHECK-ELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 414 // CHECK-ELIDE-TREE: class_ptrs< 415 // CHECK-ELIDE-TREE: [2 * ...], 416 // CHECK-ELIDE-TREE: [&d13 != (no argument)]> 417 // CHECK-NOELIDE-TREE: no matching function for call to 'set13' 418 // CHECK-NOELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 419 // CHECK-NOELIDE-TREE: class_ptrs< 420 // CHECK-NOELIDE-TREE: [&c13 != &a13], 421 // CHECK-NOELIDE-TREE: [(no argument) != &b13]> 422 // CHECK-NOELIDE-TREE: no matching function for call to 'set13' 423 // CHECK-NOELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument 424 // CHECK-NOELIDE-TREE: class_ptrs< 425 // CHECK-NOELIDE-TREE: &a13, 426 // CHECK-NOELIDE-TREE: &b13, 427 // CHECK-NOELIDE-TREE: [&d13 != (no argument)]> 428 429 430 // CHECK-ELIDE-NOTREE: {{[0-9]*}} errors generated. 431 // CHECK-NOELIDE-NOTREE: {{[0-9]*}} errors generated. 432 // CHECK-ELIDE-TREE: {{[0-9]*}} errors generated. 433 // CHECK-NOELIDE-TREE: {{[0-9]*}} errors generated. 434