//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14, c++17 // // class set // template // synth-three-way-result operator<=>(const set& x, // const set& y); #include #include "test_allocator.h" int main(int, char**) { // Mismatching allocators { std::set, std::allocator> s1; std::set, test_allocator> s2; // expected-error@+1 {{invalid operands to binary expression}} s1 <=> s2; // expected-error@+1 {{invalid operands to binary expression}} s2 <=> s1; } // Mismatching comparision functions { std::set> s1; std::set> s2; // expected-error@+1 {{invalid operands to binary expression}} s1 <=> s2; // expected-error@+1 {{invalid operands to binary expression}} s2 <=> s1; } { std::set> s1; std::set> s2; // expected-error@+1 {{invalid operands to binary expression}} s1 <=> s2; // expected-error@+1 {{invalid operands to binary expression}} s2 <=> s1; } // Mismatching types { std::set s1; std::set s2; // expected-error@+1 {{invalid operands to binary expression}} s1 <=> s2; // expected-error@+1 {{invalid operands to binary expression}} s2 <=> s1; } return 0; }