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 //===----------------------------------------------------------------------===//
10 // UNSUPPORTED: c++03, c++11, c++14
11 // UNSUPPORTED: libcpp-no-deduction-guides
14 // template <class InputIterator, class Allocator = allocator<typename iterator_traits<InputIterator>::value_type>>
15 // deque(InputIterator, InputIterator, Allocator = Allocator())
16 // -> deque<typename iterator_traits<InputIterator>::value_type, Allocator>;
24 #include <climits> // INT_MAX
30 // Test the explicit deduction guides
32 // Test the implicit deduction guides
34 // deque (allocator &)
35 std::deque
deq((std::allocator
<int>())); // expected-error {{no viable constructor or deduction guide for deduction of template arguments of 'deque'}}
36 // Note: The extra parens are necessary, since otherwise clang decides it is a function declaration.
37 // Also, we can't use {} instead of parens, because that constructs a
38 // deque<allocator<int>, allocator<allocator<int>>>