[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / libcxx / test / std / containers / associative / set / set.nonmember / compare.three_way.verify.cpp
bloba2d8c4e44e4e51548bedf86881fb23bbddfff680
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 // UNSUPPORTED: c++03, c++11, c++14, c++17
10 // <set>
12 // class set
14 // template<class Key, class Compare, class Allocator>
15 // synth-three-way-result<Key> operator<=>(const set<Key, Compare, Allocator>& x,
16 // const set<Key, Compare, Allocator>& y);
18 #include <set>
20 #include "test_allocator.h"
22 int main(int, char**) {
23 // Mismatching allocators
25 std::set<int, std::less<int>, std::allocator<int>> s1;
26 std::set<int, std::less<int>, test_allocator<int>> s2;
27 // expected-error@+1 {{invalid operands to binary expression}}
28 s1 <=> s2;
29 // expected-error@+1 {{invalid operands to binary expression}}
30 s2 <=> s1;
32 // Mismatching comparision functions
34 std::set<int, std::less<int>> s1;
35 std::set<int, std::greater<int>> s2;
36 // expected-error@+1 {{invalid operands to binary expression}}
37 s1 <=> s2;
38 // expected-error@+1 {{invalid operands to binary expression}}
39 s2 <=> s1;
42 std::set<int, std::less<int>> s1;
43 std::set<int, std::less<float>> s2;
44 // expected-error@+1 {{invalid operands to binary expression}}
45 s1 <=> s2;
46 // expected-error@+1 {{invalid operands to binary expression}}
47 s2 <=> s1;
49 // Mismatching types
51 std::set<int> s1;
52 std::set<float> s2;
53 // expected-error@+1 {{invalid operands to binary expression}}
54 s1 <=> s2;
55 // expected-error@+1 {{invalid operands to binary expression}}
56 s2 <=> s1;
59 return 0;