1
//===----------------------------------------------------------------------===//
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
7
//===----------------------------------------------------------------------===//
8
// UNSUPPORTED: c++03, c++11, c++14, c++17
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);
20
#include "test_allocator.h"
22
int main(int, char**) {
23
// Mismatching allocators
25
std::multiset<int, std::less<int>, std::allocator<int>> s1;
26
std::multiset<int, std::less<int>, test_allocator<int>> s2;
27
// expected-error@+1 {{invalid operands to binary expression}}
29
// expected-error@+1 {{invalid operands to binary expression}}
32
// Mismatching comparision functions
34
std::multiset<int, std::less<int>> s1;
35
std::multiset<int, std::greater<int>> s2;
36
// expected-error@+1 {{invalid operands to binary expression}}
38
// expected-error@+1 {{invalid operands to binary expression}}
42
std::multiset<int, std::less<int>> s1;
43
std::multiset<int, std::less<float>> s2;
44
// expected-error@+1 {{invalid operands to binary expression}}
46
// expected-error@+1 {{invalid operands to binary expression}}
51
std::multiset<int> s1;
52
std::multiset<float> s2;
53
// expected-error@+1 {{invalid operands to binary expression}}
55
// expected-error@+1 {{invalid operands to binary expression}}