1*dbb6f8a8SMarshall Clow //===----------------------------------------------------------------------===//
2*dbb6f8a8SMarshall Clow //
3*dbb6f8a8SMarshall Clow //                     The LLVM Compiler Infrastructure
4*dbb6f8a8SMarshall Clow //
5*dbb6f8a8SMarshall Clow // This file is dual licensed under the MIT and the University of Illinois Open
6*dbb6f8a8SMarshall Clow // Source Licenses. See LICENSE.TXT for details.
7*dbb6f8a8SMarshall Clow //
8*dbb6f8a8SMarshall Clow //===----------------------------------------------------------------------===//
9*dbb6f8a8SMarshall Clow 
10*dbb6f8a8SMarshall Clow // <array>
11*dbb6f8a8SMarshall Clow // UNSUPPORTED: c++98, c++03, c++11, c++14
12*dbb6f8a8SMarshall Clow // UNSUPPORTED: libcpp-no-deduction-guides
13*dbb6f8a8SMarshall Clow 
14*dbb6f8a8SMarshall Clow 
15*dbb6f8a8SMarshall Clow // template <class InputIterator, class Allocator = allocator<typename iterator_traits<InputIterator>::value_type>>
16*dbb6f8a8SMarshall Clow //    deque(InputIterator, InputIterator, Allocator = Allocator())
17*dbb6f8a8SMarshall Clow //    -> deque<typename iterator_traits<InputIterator>::value_type, Allocator>;
18*dbb6f8a8SMarshall Clow //
19*dbb6f8a8SMarshall Clow 
20*dbb6f8a8SMarshall Clow 
21*dbb6f8a8SMarshall Clow #include <deque>
22*dbb6f8a8SMarshall Clow #include <iterator>
23*dbb6f8a8SMarshall Clow #include <cassert>
24*dbb6f8a8SMarshall Clow #include <cstddef>
25*dbb6f8a8SMarshall Clow #include <climits> // INT_MAX
26*dbb6f8a8SMarshall Clow 
27*dbb6f8a8SMarshall Clow struct A {};
28*dbb6f8a8SMarshall Clow 
29*dbb6f8a8SMarshall Clow int main()
30*dbb6f8a8SMarshall Clow {
31*dbb6f8a8SMarshall Clow //  Test the explicit deduction guides
32*dbb6f8a8SMarshall Clow 
33*dbb6f8a8SMarshall Clow //  Test the implicit deduction guides
34*dbb6f8a8SMarshall Clow     {
35*dbb6f8a8SMarshall Clow //  deque (allocator &)
36*dbb6f8a8SMarshall Clow     std::deque deq((std::allocator<int>()));  // expected-error {{no viable constructor or deduction guide for deduction of template arguments of 'deque'}}
37*dbb6f8a8SMarshall Clow //  Note: The extra parens are necessary, since otherwise clang decides it is a function declaration.
38*dbb6f8a8SMarshall Clow //  Also, we can't use {} instead of parens, because that constructs a
39*dbb6f8a8SMarshall Clow //      deque<allocator<int>, allocator<allocator<int>>>
40*dbb6f8a8SMarshall Clow     }
41*dbb6f8a8SMarshall Clow 
42*dbb6f8a8SMarshall Clow }
43