* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / overloadn.C
blob243f83be73e9d3c5730c2ed852a33a0b63d3dd39
1 // { dg-do link { target c++11 } }
2 // { dg-options "" }
3 // Generated by overload.py
5 template<typename _Tp>
6 inline _Tp&&
7 movel(_Tp& __t)
8 { return static_cast<_Tp&&>(__t); }
10 struct S{};
12 S l;                             // lvalue (l)
13 S const cl = l;                  // const lvalue (cl)
14 S r() { return l; }              // rvalue (r)
15 S const cr() { return l; }       // const rvalue (cr)
16 S & nl = l;                      // named lvalue reference (nl)
17 S const & ncl = l;               // named const lvalue reference (ncl)
18 S && nr = movel(l);              // named rvalue reference (nr)
19 S const && ncr = movel(l);       // named const rvalue reference (ncr)
20 S & ul() { return l; }           // unnamed lvalue reference (ul)
21 S const & ucl() { return l; }    // unnamed const lvalue reference (ucl)
22 S && ur() { return movel(l); }   // unnamed rvalue reference (ur)
23 S const && ucr() { return movel(l); } // unnamed const rvalue reference (ucr)
25 void l0001(const S&&) {} // { dg-message "" }
27 void l0010(S&&) {} // { dg-message "" }
29 void l0011(S&&) {} // { dg-message "" }
30 void l0011(const S&&);
32 void l0100(const S&) {}
34 void l0101(const S&) {}
35 void l0101(const S&&);
37 void l0110(const S&) {}
38 void l0110(S&&);
40 void l0111(const S&) {}
41 void l0111(S&&);
42 void l0111(const S&&);
44 void l1000(S&) {}
46 void l1001(S&) {}
47 void l1001(const S&&);
49 void l1010(S&) {}
50 void l1010(S&&);
52 void l1011(S&) {}
53 void l1011(S&&);
54 void l1011(const S&&);
56 void l1100(S&) {}
57 void l1100(const S&);
59 void l1101(S&) {}
60 void l1101(const S&);
61 void l1101(const S&&);
63 void l1110(S&) {}
64 void l1110(const S&);
65 void l1110(S&&);
67 void l1111(S&) {}
68 void l1111(const S&);
69 void l1111(S&&);
70 void l1111(const S&&);
72 void cl0001(const S&&) {} // { dg-message "" }
74 void cl0011(S&&);
75 void cl0011(const S&&) {} // { dg-message "" }
77 void cl0100(const S&) {}
79 void cl0101(const S&) {}
80 void cl0101(const S&&);
82 void cl0110(const S&) {}
83 void cl0110(S&&);
85 void cl0111(const S&) {}
86 void cl0111(S&&);
87 void cl0111(const S&&);
89 void cl1001(S&);
90 void cl1001(const S&&) {} // { dg-message "" }
92 void cl1011(S&);
93 void cl1011(S&&);
94 void cl1011(const S&&) {} // { dg-message "" }
96 void cl1100(S&);
97 void cl1100(const S&) {}
99 void cl1101(S&);
100 void cl1101(const S&) {}
101 void cl1101(const S&&);
103 void cl1110(S&);
104 void cl1110(const S&) {}
105 void cl1110(S&&);
107 void cl1111(S&);
108 void cl1111(const S&) {}
109 void cl1111(S&&);
110 void cl1111(const S&&);
112 void r0001(const S&&) {}
114 void r0010(S&&) {}
116 void r0011(S&&) {}
117 void r0011(const S&&);
119 void r0100(const S&) {}
121 void r0101(const S&);
122 void r0101(const S&&) {}
124 void r0110(const S&);
125 void r0110(S&&) {}
127 void r0111(const S&);
128 void r0111(S&&) {}
129 void r0111(const S&&);
131 void r1001(S&);
132 void r1001(const S&&) {}
134 void r1010(S&);
135 void r1010(S&&) {}
137 void r1011(S&);
138 void r1011(S&&) {}
139 void r1011(const S&&);
141 void r1100(S&);
142 void r1100(const S&) {}
144 void r1101(S&);
145 void r1101(const S&);
146 void r1101(const S&&) {}
148 void r1110(S&);
149 void r1110(const S&);
150 void r1110(S&&) {}
152 void r1111(S&);
153 void r1111(const S&);
154 void r1111(S&&) {}
155 void r1111(const S&&);
157 void cr0001(const S&&) {}
159 void cr0011(S&&);
160 void cr0011(const S&&) {}
162 void cr0100(const S&) {}
164 void cr0101(const S&);
165 void cr0101(const S&&) {}
167 void cr0110(const S&) {}
168 void cr0110(S&&);
170 void cr0111(const S&);
171 void cr0111(S&&);
172 void cr0111(const S&&) {}
174 void cr1001(S&);
175 void cr1001(const S&&) {}
177 void cr1011(S&);
178 void cr1011(S&&);
179 void cr1011(const S&&) {}
181 void cr1100(S&);
182 void cr1100(const S&) {}
184 void cr1101(S&);
185 void cr1101(const S&);
186 void cr1101(const S&&) {}
188 void cr1110(S&);
189 void cr1110(const S&) {}
190 void cr1110(S&&);
192 void cr1111(S&);
193 void cr1111(const S&);
194 void cr1111(S&&);
195 void cr1111(const S&&) {}
197 void nl0001(const S&&) {} // { dg-message "" }
199 void nl0010(S&&) {} // { dg-message "" }
201 void nl0011(S&&) {} // { dg-message "" }
202 void nl0011(const S&&);
204 void nl0100(const S&) {}
206 void nl0101(const S&) {}
207 void nl0101(const S&&);
209 void nl0110(const S&) {}
210 void nl0110(S&&);
212 void nl0111(const S&) {}
213 void nl0111(S&&);
214 void nl0111(const S&&);
216 void nl1000(S&) {}
218 void nl1001(S&) {}
219 void nl1001(const S&&);
221 void nl1010(S&) {}
222 void nl1010(S&&);
224 void nl1011(S&) {}
225 void nl1011(S&&);
226 void nl1011(const S&&);
228 void nl1100(S&) {}
229 void nl1100(const S&);
231 void nl1101(S&) {}
232 void nl1101(const S&);
233 void nl1101(const S&&);
235 void nl1110(S&) {}
236 void nl1110(const S&);
237 void nl1110(S&&);
239 void nl1111(S&) {}
240 void nl1111(const S&);
241 void nl1111(S&&);
242 void nl1111(const S&&);
244 void ncl0001(const S&&) {} // { dg-message "" }
246 void ncl0011(S&&);
247 void ncl0011(const S&&) {} // { dg-message "" }
249 void ncl0100(const S&) {}
251 void ncl0101(const S&) {}
252 void ncl0101(const S&&);
254 void ncl0110(const S&) {}
255 void ncl0110(S&&);
257 void ncl0111(const S&) {}
258 void ncl0111(S&&);
259 void ncl0111(const S&&);
261 void ncl1001(S&);
262 void ncl1001(const S&&) {} // { dg-message "" }
264 void ncl1011(S&);
265 void ncl1011(S&&);
266 void ncl1011(const S&&) {} // { dg-message "" }
268 void ncl1100(S&);
269 void ncl1100(const S&) {}
271 void ncl1101(S&);
272 void ncl1101(const S&) {}
273 void ncl1101(const S&&);
275 void ncl1110(S&);
276 void ncl1110(const S&) {}
277 void ncl1110(S&&);
279 void ncl1111(S&);
280 void ncl1111(const S&) {}
281 void ncl1111(S&&);
282 void ncl1111(const S&&);
284 void nr0001(const S&&) {} // { dg-message "" }
286 void nr0010(S&&) {} // { dg-message "" }
288 void nr0011(S&&) {} // { dg-message "" }
289 void nr0011(const S&&);
291 void nr0100(const S&) {}
293 void nr0101(const S&) {}
294 void nr0101(const S&&);
296 void nr0110(const S&) {}
297 void nr0110(S&&);
299 void nr0111(const S&) {}
300 void nr0111(S&&);
301 void nr0111(const S&&);
303 void nr1000(S&) {}
305 void nr1001(S&) {}
306 void nr1001(const S&&);
308 void nr1010(S&) {}
309 void nr1010(S&&);
311 void nr1011(S&) {}
312 void nr1011(S&&);
313 void nr1011(const S&&);
315 void nr1100(S&) {}
316 void nr1100(const S&);
318 void nr1101(S&) {}
319 void nr1101(const S&);
320 void nr1101(const S&&);
322 void nr1110(S&) {}
323 void nr1110(const S&);
324 void nr1110(S&&);
326 void nr1111(S&) {}
327 void nr1111(const S&);
328 void nr1111(S&&);
329 void nr1111(const S&&);
331 void ncr0001(const S&&) {} // { dg-message "" }
333 void ncr0011(S&&);
334 void ncr0011(const S&&) {} // { dg-message "" }
336 void ncr0100(const S&) {}
338 void ncr0101(const S&) {}
339 void ncr0101(const S&&);
341 void ncr0110(const S&) {}
342 void ncr0110(S&&);
344 void ncr0111(const S&) {}
345 void ncr0111(S&&);
346 void ncr0111(const S&&);
348 void ncr1001(S&);
349 void ncr1001(const S&&) {} // { dg-message "" }
351 void ncr1011(S&);
352 void ncr1011(S&&);
353 void ncr1011(const S&&) {} // { dg-message "" }
355 void ncr1100(S&);
356 void ncr1100(const S&) {}
358 void ncr1101(S&);
359 void ncr1101(const S&) {}
360 void ncr1101(const S&&);
362 void ncr1110(S&);
363 void ncr1110(const S&) {}
364 void ncr1110(S&&);
366 void ncr1111(S&);
367 void ncr1111(const S&) {}
368 void ncr1111(S&&);
369 void ncr1111(const S&&);
371 void ul0001(const S&&) {} // { dg-message "" }
373 void ul0010(S&&) {} // { dg-message "" }
375 void ul0011(S&&) {} // { dg-message "" }
376 void ul0011(const S&&);
378 void ul0100(const S&) {}
380 void ul0101(const S&) {}
381 void ul0101(const S&&);
383 void ul0110(const S&) {}
384 void ul0110(S&&);
386 void ul0111(const S&) {}
387 void ul0111(S&&);
388 void ul0111(const S&&);
390 void ul1000(S&) {}
392 void ul1001(S&) {}
393 void ul1001(const S&&);
395 void ul1010(S&) {}
396 void ul1010(S&&);
398 void ul1011(S&) {}
399 void ul1011(S&&);
400 void ul1011(const S&&);
402 void ul1100(S&) {}
403 void ul1100(const S&);
405 void ul1101(S&) {}
406 void ul1101(const S&);
407 void ul1101(const S&&);
409 void ul1110(S&) {}
410 void ul1110(const S&);
411 void ul1110(S&&);
413 void ul1111(S&) {}
414 void ul1111(const S&);
415 void ul1111(S&&);
416 void ul1111(const S&&);
418 void ucl0001(const S&&) {} // { dg-message "" }
420 void ucl0011(S&&);
421 void ucl0011(const S&&) {} // { dg-message "" }
423 void ucl0100(const S&) {}
425 void ucl0101(const S&) {}
426 void ucl0101(const S&&);
428 void ucl0110(const S&) {}
429 void ucl0110(S&&);
431 void ucl0111(const S&) {}
432 void ucl0111(S&&);
433 void ucl0111(const S&&);
435 void ucl1001(S&);
436 void ucl1001(const S&&) {} // { dg-message "" }
438 void ucl1011(S&);
439 void ucl1011(S&&);
440 void ucl1011(const S&&) {} // { dg-message "" }
442 void ucl1100(S&);
443 void ucl1100(const S&) {}
445 void ucl1101(S&);
446 void ucl1101(const S&) {}
447 void ucl1101(const S&&);
449 void ucl1110(S&);
450 void ucl1110(const S&) {}
451 void ucl1110(S&&);
453 void ucl1111(S&);
454 void ucl1111(const S&) {}
455 void ucl1111(S&&);
456 void ucl1111(const S&&);
458 void ur0001(const S&&) {}
460 void ur0010(S&&) {}
462 void ur0011(S&&) {}
463 void ur0011(const S&&);
465 void ur0100(const S&) {}
467 void ur0101(const S&);
468 void ur0101(const S&&) {}
470 void ur0110(const S&);
471 void ur0110(S&&) {}
473 void ur0111(const S&);
474 void ur0111(S&&) {}
475 void ur0111(const S&&);
477 void ur1001(S&);
478 void ur1001(const S&&) {}
480 void ur1010(S&);
481 void ur1010(S&&) {}
483 void ur1011(S&);
484 void ur1011(S&&) {}
485 void ur1011(const S&&);
487 void ur1100(S&);
488 void ur1100(const S&) {}
490 void ur1101(S&);
491 void ur1101(const S&);
492 void ur1101(const S&&) {}
494 void ur1110(S&);
495 void ur1110(const S&);
496 void ur1110(S&&) {}
498 void ur1111(S&);
499 void ur1111(const S&);
500 void ur1111(S&&) {}
501 void ur1111(const S&&);
503 void ucr0001(const S&&) {}
505 void ucr0011(S&&);
506 void ucr0011(const S&&) {}
508 void ucr0100(const S&) {}
510 void ucr0101(const S&);
511 void ucr0101(const S&&) {}
513 void ucr0110(const S&) {}
514 void ucr0110(S&&);
516 void ucr0111(const S&);
517 void ucr0111(S&&);
518 void ucr0111(const S&&) {}
520 void ucr1001(S&);
521 void ucr1001(const S&&) {}
523 void ucr1011(S&);
524 void ucr1011(S&&);
525 void ucr1011(const S&&) {}
527 void ucr1100(S&);
528 void ucr1100(const S&) {}
530 void ucr1101(S&);
531 void ucr1101(const S&);
532 void ucr1101(const S&&) {}
534 void ucr1110(S&);
535 void ucr1110(const S&) {}
536 void ucr1110(S&&);
538 void ucr1111(S&);
539 void ucr1111(const S&);
540 void ucr1111(S&&);
541 void ucr1111(const S&&) {}
544 int main()
546   l0001(l); // { dg-error "" }
547   l0010(l); // { dg-error "" }
548   l0011(l); // { dg-error "" }
549   l0100(l);
550   l0101(l);
551   l0110(l);
552   l0111(l);
553   l1000(l);
554   l1001(l);
555   l1010(l);
556   l1011(l);
557   l1100(l);
558   l1101(l);
559   l1110(l);
560   l1111(l);
561   cl0001(cl); // { dg-error "lvalue" }
562   cl0011(cl); // { dg-error "lvalue" }
563   cl0100(cl);
564   cl0101(cl);
565   cl0110(cl);
566   cl0111(cl);
567   cl1001(cl); // { dg-error "" }
568   cl1011(cl); // { dg-error "" }
569   cl1100(cl);
570   cl1101(cl);
571   cl1110(cl);
572   cl1111(cl);
573   r0001(r());
574   r0010(r());
575   r0011(r());
576   r0100(r());
577   r0101(r());
578   r0110(r());
579   r0111(r());
580   r1001(r());
581   r1010(r());
582   r1011(r());
583   r1100(r());
584   r1101(r());
585   r1110(r());
586   r1111(r());
587   cr0001(cr());
588   cr0011(cr());
589   cr0100(cr());
590   cr0101(cr());
591   cr0110(cr());
592   cr0111(cr());
593   cr1001(cr());
594   cr1011(cr());
595   cr1100(cr());
596   cr1101(cr());
597   cr1110(cr());
598   cr1111(cr());
599   nl0001(nl); // { dg-error "lvalue" }
600   nl0010(nl); // { dg-error "lvalue" }
601   nl0011(nl); // { dg-error "lvalue" }
602   nl0100(nl);
603   nl0101(nl);
604   nl0110(nl);
605   nl0111(nl);
606   nl1000(nl);
607   nl1001(nl);
608   nl1010(nl);
609   nl1011(nl);
610   nl1100(nl);
611   nl1101(nl);
612   nl1110(nl);
613   nl1111(nl);
614   ncl0001(ncl); // { dg-error "lvalue" }
615   ncl0011(ncl); // { dg-error "lvalue" }
616   ncl0100(ncl);
617   ncl0101(ncl);
618   ncl0110(ncl);
619   ncl0111(ncl);
620   ncl1001(ncl); // { dg-error "" }
621   ncl1011(ncl); // { dg-error "" }
622   ncl1100(ncl);
623   ncl1101(ncl);
624   ncl1110(ncl);
625   ncl1111(ncl);
626   nr0001(nr); // { dg-error "lvalue" }
627   nr0010(nr); // { dg-error "lvalue" }
628   nr0011(nr); // { dg-error "lvalue" }
629   nr0100(nr);
630   nr0101(nr);
631   nr0110(nr);
632   nr0111(nr);
633   nr1000(nr);
634   nr1001(nr);
635   nr1010(nr);
636   nr1011(nr);
637   nr1100(nr);
638   nr1101(nr);
639   nr1110(nr);
640   nr1111(nr);
641   ncr0001(ncr); // { dg-error "lvalue" }
642   ncr0011(ncr); // { dg-error "lvalue" }
643   ncr0100(ncr);
644   ncr0101(ncr);
645   ncr0110(ncr);
646   ncr0111(ncr);
647   ncr1001(ncr); // { dg-error "" }
648   ncr1011(ncr); // { dg-error "" }
649   ncr1100(ncr);
650   ncr1101(ncr);
651   ncr1110(ncr);
652   ncr1111(ncr);
653   ul0001(ul()); // { dg-error "lvalue" }
654   ul0010(ul()); // { dg-error "lvalue" }
655   ul0011(ul()); // { dg-error "lvalue" }
656   ul0100(ul());
657   ul0101(ul());
658   ul0110(ul());
659   ul0111(ul());
660   ul1000(ul());
661   ul1001(ul());
662   ul1010(ul());
663   ul1011(ul());
664   ul1100(ul());
665   ul1101(ul());
666   ul1110(ul());
667   ul1111(ul());
668   ucl0001(ucl()); // { dg-error "lvalue" }
669   ucl0011(ucl()); // { dg-error "lvalue" }
670   ucl0100(ucl());
671   ucl0101(ucl());
672   ucl0110(ucl());
673   ucl0111(ucl());
674   ucl1001(ucl()); // { dg-error "" }
675   ucl1011(ucl()); // { dg-error "" }
676   ucl1100(ucl());
677   ucl1101(ucl());
678   ucl1110(ucl());
679   ucl1111(ucl());
680   ur0001(ur());
681   ur0010(ur());
682   ur0011(ur());
683   ur0100(ur());
684   ur0101(ur());
685   ur0110(ur());
686   ur0111(ur());
687   ur1001(ur());
688   ur1010(ur());
689   ur1011(ur());
690   ur1100(ur());
691   ur1101(ur());
692   ur1110(ur());
693   ur1111(ur());
694   ucr0001(ucr());
695   ucr0011(ucr());
696   ucr0100(ucr());
697   ucr0101(ucr());
698   ucr0110(ucr());
699   ucr0111(ucr());
700   ucr1001(ucr());
701   ucr1011(ucr());
702   ucr1100(ucr());
703   ucr1101(ucr());
704   ucr1110(ucr());
705   ucr1111(ucr());
707   return 0;