gcc/testsuite/g++.dg/template/overload6.C
raw| 1 | // Copyright (C) 2005 Free Software Foundation, Inc. |
| 2 | // Contributed by Nathan Sidwell 12 Oct 2005 <[email protected]> |
| 3 | |
| 4 | // PR 21592:ICE |
| 5 | // Origin: Volker Reichelt <[email protected]> |
| 6 | |
| 7 | template<typename T> void unique(T,T); |
| 8 | |
| 9 | struct A |
| 10 | { |
| 11 | int begin(); |
| 12 | }; |
| 13 | |
| 14 | template<int> void foo() |
| 15 | { |
| 16 | unique(A().begin); // { dg-error "invalid use of non-static member function" } |
| 17 | } |