//===----------------------------------------------------------------------===// // // 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++98, c++03, c++11, c++14 // UNSUPPORTED: libcpp-no-deduction-guides // XFAIL: clang-6, apple-clang-9.0, apple-clang-9.1, apple-clang-10.0.0 // template>, // class Pred = equal_to>, // class Allocator = allocator>> // unordered_multimap(InputIterator, InputIterator, typename see below::size_type = see below, // Hash = Hash(), Pred = Pred(), Allocator = Allocator()) // -> unordered_multimap, iter-mapped-type, Hash, Pred, // Allocator>; // // template, // class Pred = equal_to, class Allocator = allocator>> // unordered_multimap(initializer_list>, // typename see below::size_type = see below, Hash = Hash(), // Pred = Pred(), Allocator = Allocator()) // -> unordered_multimap; // // template // unordered_multimap(InputIterator, InputIterator, typename see below::size_type, Allocator) // -> unordered_multimap, iter-mapped-type, // hash>, // equal_to>, Allocator>; // // template // unordered_multimap(InputIterator, InputIterator, Allocator) // -> unordered_multimap, iter-mapped-type, // hash>, // equal_to>, Allocator>; // // template // unordered_multimap(InputIterator, InputIterator, typename see below::size_type, Hash, Allocator) // -> unordered_multimap, iter-mapped-type, Hash, // equal_to>, Allocator>; // // template // unordered_multimap(initializer_list>, typename see below::size_type, Allocator) // -> unordered_multimap, equal_to, Allocator>; // // template // unordered_multimap(initializer_list>, Allocator) // -> unordered_multimap, equal_to, Allocator>; // // template // unordered_multimap(initializer_list>, typename see below::size_type, Hash, // Allocator) // -> unordered_multimap, Allocator>; #include #include int main(int, char**) { using P = std::pair; { // cannot deduce Key from nothing std::unordered_multimap m; // expected-error{{no viable constructor or deduction guide for deduction of template arguments of 'unordered_multimap'}} } { // cannot deduce Key from just (Size) std::unordered_multimap m(42); // expected-error{{no viable constructor or deduction guide for deduction of template arguments of 'unordered_multimap'}} } { // cannot deduce Key from just (Size, Hash) std::unordered_multimap m(42, std::hash()); // expected-error@-1{{no viable constructor or deduction guide for deduction of template arguments of 'unordered_multimap'}} } { // cannot deduce Key from just (Size, Hash, Pred) std::unordered_multimap m(42, std::hash(), std::equal_to()); // expected-error@-1{{no viable constructor or deduction guide for deduction of template arguments of 'unordered_multimap'}} } { // cannot deduce Key from just (Size, Hash, Pred, Allocator) std::unordered_multimap m(42, std::hash(), std::equal_to(), std::allocator

()); // expected-error@-1{{no viable constructor or deduction guide for deduction of template arguments of 'unordered_multimap'}} } { // cannot deduce Key from just (Allocator) std::unordered_multimap m(std::allocator

{}); // expected-error@-1{{no viable constructor or deduction guide for deduction of template arguments of 'unordered_multimap'}} } { // cannot deduce Key from just (Size, Allocator) std::unordered_multimap m(42, std::allocator

()); // expected-error@-1{{no viable constructor or deduction guide for deduction of template arguments of 'unordered_multimap'}} } { // cannot deduce Key from just (Size, Hash, Allocator) std::unordered_multimap m(42, std::hash(), std::allocator

()); // expected-error@-1{{no viable constructor or deduction guide for deduction of template arguments of 'unordered_multimap'}} } return 0; }