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