//===----------------------------------------------------------------------===// // // 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 multimap // template // synth-three-way-result> // operator<=>(const multimap& x, // const multimap& y); #include #include "test_allocator.h" int main(int, char**) { // Mismatching allocators { std::multimap, std::allocator> s1; std::multimap, test_allocator> s2; // expected-error-re@*:* {{static assertion failed due to requirement {{.+}}Allocator::value_type must be same type as value_type}} s1 <=> s2; // expected-error-re@*:* {{static assertion failed due to requirement {{.+}}Allocator::value_type must be same type as value_type}} s2 <=> s1; } // Mismatching comparision functions { std::multimap> s1; std::multimap> s2; // expected-error@+1 {{invalid operands to binary expression}} s1 <=> s2; // expected-error@+1 {{invalid operands to binary expression}} s2 <=> s1; } { std::multimap> s1; std::multimap> s2; // expected-error@+1 {{invalid operands to binary expression}} s1 <=> s2; // expected-error@+1 {{invalid operands to binary expression}} s2 <=> s1; } // Mismatching types { std::multimap s1; std::multimap s2; // expected-error@+1 {{invalid operands to binary expression}} s1 <=> s2; // expected-error@+1 {{invalid operands to binary expression}} s2 <=> s1; } return 0; }