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 // UNSUPPORTED: c++03
10 // UNSUPPORTED: !libc++ && c++11
11 // UNSUPPORTED: !libc++ && c++14
12 // <charconv>
13 
14 // In
15 //
16 // from_chars_result from_chars(const char* first, const char* last,
17 //                              Integral& value, int base = 10)
18 //
19 // Integral cannot be bool.
20 
21 #include <charconv>
22 
main(int,char **)23 int main(int, char**)
24 {
25     using std::from_chars;
26     char buf[] = "01001";
27     bool lv;
28 
29     from_chars(buf, buf + sizeof(buf), lv);      // expected-error {{call to deleted function}}
30     from_chars(buf, buf + sizeof(buf), lv, 16);  // expected-error {{call to deleted function}}
31 
32   return 0;
33 }
34