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