1df8f7547SMarshall Clow //===----------------------------------------------------------------------===//
2df8f7547SMarshall 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
6df8f7547SMarshall Clow //
7df8f7547SMarshall Clow //===----------------------------------------------------------------------===//
8df8f7547SMarshall Clow 
9df8f7547SMarshall Clow // <vector>
10*31cbe0f2SLouis Dionne // UNSUPPORTED: c++03, c++11, c++14
11df8f7547SMarshall Clow 
12df8f7547SMarshall Clow // template <class InputIterator, class Allocator = allocator<typename iterator_traits<InputIterator>::value_type>>
13df8f7547SMarshall Clow //    vector(InputIterator, InputIterator, Allocator = Allocator())
14df8f7547SMarshall Clow //    -> vector<typename iterator_traits<InputIterator>::value_type, Allocator>;
15df8f7547SMarshall Clow //
16df8f7547SMarshall Clow 
17df8f7547SMarshall Clow #include <deque>
18df8f7547SMarshall Clow #include <iterator>
19df8f7547SMarshall Clow #include <cassert>
20df8f7547SMarshall Clow #include <cstddef>
21df8f7547SMarshall Clow 
22df8f7547SMarshall Clow 
main(int,char **)232df59c50SJF Bastien int main(int, char**)
24df8f7547SMarshall Clow {
25df8f7547SMarshall Clow //  Test the explicit deduction guides
26df8f7547SMarshall Clow 
27df8f7547SMarshall Clow //  Test the implicit deduction guides
28df8f7547SMarshall Clow     {
29df8f7547SMarshall Clow //  vector (allocator &)
30df8f7547SMarshall Clow     std::vector vec((std::allocator<int>()));  // expected-error {{no viable constructor or deduction guide for deduction of template arguments of 'vector'}}
31df8f7547SMarshall Clow //  Note: The extra parens are necessary, since otherwise clang decides it is a function declaration.
32df8f7547SMarshall Clow //  Also, we can't use {} instead of parens, because that constructs a
33df8f7547SMarshall Clow //      deque<allocator<int>, allocator<allocator<int>>>
34df8f7547SMarshall Clow     }
35df8f7547SMarshall Clow 
362df59c50SJF Bastien 
372df59c50SJF Bastien   return 0;
38df8f7547SMarshall Clow }
39