p3.cpp revision 97c6739a1e74a3131261081054ff4a75e4e3b64c
1// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s 2 3// This is specifically testing the bullet: 4// "do not have the same parameter-type-list as any non-template 5// non-member candidate." 6// The rest is sort of hard to test separately. 7 8enum E1 { one }; 9enum E2 { two }; 10 11struct A; 12 13A operator >= (E1, E1); 14A operator >= (E1, const E2); 15 16E1 a; 17E2 b; 18 19extern A test1; 20extern decltype(a >= a) test1; 21extern decltype(a >= b) test1; 22 23template <typename T> A operator <= (E1, T); 24extern bool test2; 25extern decltype(a <= a) test2; 26 27extern A test3; 28extern decltype(a <= b) test3;