1 //===----------------------------------------------------------------------===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8
9 // <vector>
10 // UNSUPPORTED: c++03, c++11, c++14
11
12 // template <class InputIterator, class Allocator = allocator<typename iterator_traits<InputIterator>::value_type>>
13 // vector(InputIterator, InputIterator, Allocator = Allocator())
14 // -> vector<typename iterator_traits<InputIterator>::value_type, Allocator>;
15 //
16
17 #include <cassert>
18 #include <cstddef>
19 #include <vector>
20
main(int,char **)21 int main(int, char**) {
22 // Test the explicit deduction guides
23 // TODO: Should there be tests for explicit deduction guides?
24
25 // Test the implicit deduction guides
26 {
27 // vector (allocator &)
28 // expected-error-re@+1 {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}vector'}}
29 std::vector vec(std::allocator< int>{});
30 }
31
32 return 0;
33 }
34