PR c++/56428
* g++.dg/cpp0x/nontype4.C: New test.
From-SVN: r274028
+2019-08-02 Marek Polacek <polacek@redhat.com>
+
+ PR c++/56428
+ * g++.dg/cpp0x/nontype4.C: New test.
+
2019-08-02 Marek Polacek <polacek@redhat.com>
PR c++/53009
--- /dev/null
+// PR c++/56428
+// { dg-do compile { target c++11 } }
+
+struct A { };
+
+template<bool B>
+ struct Builder
+ {
+ static A build() { return A(); }
+ };
+
+template<A (*F)()>
+ A f()
+ {
+ return Builder<F != nullptr>::build();
+ }
+
+A g();
+
+int main()
+{
+ f< &g >();
+ f< nullptr >();
+ f< &f<nullptr> >();
+}