1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 // UNSUPPORTED: c++98, c++03, c++11, c++14
12 // XFAIL: libcpp-no-deduction-guides
14 // template<class InputIterator>
15 // basic_string(InputIterator begin, InputIterator end,
16 // const Allocator& a = Allocator());
18 // template<class charT,
20 // class Allocator = allocator<charT>
22 // basic_string(basic_string_view<charT, traits>,
23 // typename see below::size_type,
24 // typename see below::size_type,
25 // const Allocator& = Allocator())
26 // -> basic_string<charT, traits, Allocator>;
28 // A size_type parameter type in a basic_string deduction guide refers to the size_type
29 // member type of the type deduced by the deduction guide.
31 // The deduction guide shall not participate in overload resolution if Allocator
32 // is a type that does not qualify as an allocator.
36 #include <string_view>
44 std::string_view sv = "12345678901234";
45 std::basic_string s1{sv, 0, 4, 23}; // expected-error {{no viable constructor or deduction guide for deduction of template arguments of 'basic_string'}}