[cfe-commits] r99613 - /cfe/trunk/test/CXX/temp/temp.fct.spec/temp.deduct/p9.cpp

Douglas Gregor dgregor at apple.com
Thu Mar 25 22:57:46 PDT 2010


Author: dgregor
Date: Fri Mar 26 00:57:46 2010
New Revision: 99613

URL: http://llvm.org/viewvc/llvm-project?rev=99613&view=rev
Log:
Add tests for PR6707.

Modified:
    cfe/trunk/test/CXX/temp/temp.fct.spec/temp.deduct/p9.cpp

Modified: cfe/trunk/test/CXX/temp/temp.fct.spec/temp.deduct/p9.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/temp/temp.fct.spec/temp.deduct/p9.cpp?rev=99613&r1=99612&r2=99613&view=diff
==============================================================================
--- cfe/trunk/test/CXX/temp/temp.fct.spec/temp.deduct/p9.cpp (original)
+++ cfe/trunk/test/CXX/temp/temp.fct.spec/temp.deduct/p9.cpp Fri Mar 26 00:57:46 2010
@@ -4,3 +4,23 @@
 template <signed char> int f(int); // expected-note 2{{candidate}}
 int i1 = f<1>(0); // expected-error{{ambiguous}}
 int i2 = f<1000>(0); // expected-error{{ambiguous}}
+
+namespace PR6707 {
+  template<typename T, T Value>
+  struct X { };
+
+  template<typename T, T Value>
+  void f(X<T, Value>);
+
+  void g(X<int, 10> x) {
+    f(x);
+  }
+
+  static const unsigned char ten = 10;
+  template<typename T, T Value, typename U>
+  void f2(X<T, Value>, X<U, Value>);
+
+  void g2() {
+    f2(X<int, 10>(), X<char, ten>());
+  }
+}





More information about the cfe-commits mailing list