1dbb6f8a8SMarshall Clow //===----------------------------------------------------------------------===//
2dbb6f8a8SMarshall Clow //
357b08b09SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
457b08b09SChandler Carruth // See https://llvm.org/LICENSE.txt for license information.
557b08b09SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6dbb6f8a8SMarshall Clow //
7dbb6f8a8SMarshall Clow //===----------------------------------------------------------------------===//
8dbb6f8a8SMarshall Clow
9dbb6f8a8SMarshall Clow // <array>
10*31cbe0f2SLouis Dionne // UNSUPPORTED: c++03, c++11, c++14
11dbb6f8a8SMarshall Clow
12dbb6f8a8SMarshall Clow // template <class InputIterator, class Allocator = allocator<typename iterator_traits<InputIterator>::value_type>>
13dbb6f8a8SMarshall Clow // deque(InputIterator, InputIterator, Allocator = Allocator())
14dbb6f8a8SMarshall Clow // -> deque<typename iterator_traits<InputIterator>::value_type, Allocator>;
15dbb6f8a8SMarshall Clow //
16dbb6f8a8SMarshall Clow
17dbb6f8a8SMarshall Clow #include <deque>
18dbb6f8a8SMarshall Clow #include <iterator>
19dbb6f8a8SMarshall Clow #include <cassert>
20dbb6f8a8SMarshall Clow #include <cstddef>
21dbb6f8a8SMarshall Clow #include <climits> // INT_MAX
22dbb6f8a8SMarshall Clow
23dbb6f8a8SMarshall Clow struct A {};
24dbb6f8a8SMarshall Clow
main(int,char **)252df59c50SJF Bastien int main(int, char**)
26dbb6f8a8SMarshall Clow {
27dbb6f8a8SMarshall Clow // Test the explicit deduction guides
28dbb6f8a8SMarshall Clow
29dbb6f8a8SMarshall Clow // Test the implicit deduction guides
30dbb6f8a8SMarshall Clow {
31dbb6f8a8SMarshall Clow // deque (allocator &)
32dbb6f8a8SMarshall Clow std::deque deq((std::allocator<int>())); // expected-error {{no viable constructor or deduction guide for deduction of template arguments of 'deque'}}
33dbb6f8a8SMarshall Clow // Note: The extra parens are necessary, since otherwise clang decides it is a function declaration.
34dbb6f8a8SMarshall Clow // Also, we can't use {} instead of parens, because that constructs a
35dbb6f8a8SMarshall Clow // deque<allocator<int>, allocator<allocator<int>>>
36dbb6f8a8SMarshall Clow }
37dbb6f8a8SMarshall Clow
382df59c50SJF Bastien
392df59c50SJF Bastien return 0;
40dbb6f8a8SMarshall Clow }
41