PR rtl-optimization/57003
[official-gcc.git] / libstdc++-v3 / testsuite / util / testsuite_greedy_ops.h
blob47f227ba63b0f0cc12c043c3339a6f0706508712
1 // Copyright (C) 2010-2014 Free Software Foundation, Inc.
2 //
3 // This file is part of the GNU ISO C++ Library. This library is free
4 // software; you can redistribute it and/or modify it under the
5 // terms of the GNU General Public License as published by the
6 // Free Software Foundation; either version 3, or (at your option)
7 // any later version.
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License along
15 // with this library; see the file COPYING3. If not see
16 // <http://www.gnu.org/licenses/>.
18 namespace greedy_ops
20 struct X
21 { };
23 template<typename T>
24 X operator==(T, T)
25 { return X(); }
27 template<typename T>
28 X operator!=(T, T)
29 { return X(); }
31 template<typename T>
32 X operator<(T, T)
33 { return X(); }
35 template<typename T>
36 X operator<=(T, T)
37 { return X(); }
39 template<typename T>
40 X operator>(T, T)
41 { return X(); }
43 template<typename T>
44 X operator>=(T, T)
45 { return X(); }
47 template<typename T>
48 X operator-(T, T)
49 { return X(); }
51 template<typename T>
52 T operator+(std::size_t, T)
53 { return T(); }
55 template<typename T>
56 T operator+(T, std::size_t)
57 { return T(); }