X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=gcc%2Ftestsuite%2Fg%2B%2B.old-deja%2Fg%2B%2B.robertl%2Feb43.C;fp=gcc%2Ftestsuite%2Fg%2B%2B.old-deja%2Fg%2B%2B.robertl%2Feb43.C;h=0000000000000000000000000000000000000000;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=f98464c91df01dbc8d24df450234d917c17015b2;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb43.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb43.C deleted file mode 100644 index f98464c9..00000000 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb43.C +++ /dev/null @@ -1,41 +0,0 @@ -// All the pointer_to_binary_function cases used to fail because g++ -// couldn't handle converting an overloaded function to a class type. -// The first one should still fail because it requires an implicit conversion -// to pointer_to_binary_function, which has an `explicit' constructor. - -#include -#include -#include - -using namespace std; - -template class Expr -{ -public : - Expr(){}; - Expr(const T&){}; -}; - -template -inline bool compare(const Expr a, const Expr b){ return true; }; - -int main() -{ - vector a(3); - sort( a.begin(), a.end(), - static_cast,const Expr)>(compare) ); - sort( a.begin(), a.end(), compare ); - sort::iterator, - pointer_to_binary_function, const Expr, bool> > - ( a.begin(), a.end(), compare ); // ERROR - constructor is explicit - sort( a.begin(), a.end(), - ptr_fun, const Expr, bool> (compare) ); - sort( a.begin(), a.end(), - ptr_fun(compare) ); - sort( a.begin(), a.end(), - pointer_to_binary_function, const Expr, bool>(compare) ); - sort( a.begin(), a.end(), - pointer_to_binary_function, const Expr, bool>(compare) ); - sort( a.begin(), a.end(), - pointer_to_binary_function, const Expr, bool>(compare<>) ); -}