From: Gabriel Dos Reis Date: Sun, 29 Dec 2002 16:12:43 +0000 (+0000) Subject: new test. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5f77bfb5c7104b463607f2b7077cb62c6409240f;p=gcc.git new test. From-SVN: r60603 --- diff --git a/gcc/testsuite/g++.dg/overload/operator-star-1.C b/gcc/testsuite/g++.dg/overload/operator-star-1.C new file mode 100644 index 00000000000..8780d5f622f --- /dev/null +++ b/gcc/testsuite/g++.dg/overload/operator-star-1.C @@ -0,0 +1,27 @@ +// Copyright (C) 2002 Free Software Foundation +// Origin: C++/70 +// Contributed by Gabriel Dos Reis +// { dg-do compile } + +template + struct S; + +template + void operator* (S, S); + +template + struct S + { + friend void operator*<> (S, S); // { } // okay + void operator* (T) { } + }; + +template + void operator* (S, S) { } + +int main() +{ + S s1, s2; + s1 * s2; + s1 * 2; +}