]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Mark call to sort() as error, per Alexandre Oliva.
authorRobert Lipe <robertl@gcc.gnu.org>
Sun, 31 May 1998 22:21:26 +0000 (22:21 +0000)
committerRobert Lipe <robertl@gcc.gnu.org>
Sun, 31 May 1998 22:21:26 +0000 (22:21 +0000)
From-SVN: r20157

gcc/testsuite/g++.old-deja/g++.robertl/eb42.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb42.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb42.C
new file mode 100644 (file)
index 0000000..6d15ec7
--- /dev/null
@@ -0,0 +1,18 @@
+#include <vector.h>
+#include <algo.h>
+
+template <class T> class Expr
+{
+public :
+Expr(){};
+Expr(const T&){};
+};
+
+template <class T >
+inline bool compare(const Expr<T> a, const Expr<T> b){ return true; };
+
+int main()
+{
+vector<int>     a(3);
+sort( a.begin(), a.end(), compare ); // ERROR - no matching function 
+}