1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 // <string>
11 
12 // basic_string& append(initializer_list<charT> il);
13 
14 #include <string>
15 #include <cassert>
16 
17 #include "min_allocator.h"
18 
main()19 int main()
20 {
21 #ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
22     {
23         std::string s("123");
24         s.append({'a', 'b', 'c'});
25         assert(s == "123abc");
26     }
27 #if __cplusplus >= 201103L
28     {
29         typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
30         S s("123");
31         s.append({'a', 'b', 'c'});
32         assert(s == "123abc");
33     }
34 #endif
35 #endif  // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
36 }
37