Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      Standard library header <charconv> (C++17)

      From cppreference.com
      <cpp‎ |header
       
       
      Standard library headers
       

      This header is part of thetext processing library.

      Classes

      specifies formatting forstd::to_chars andstd::from_chars
      (enum)[edit]
      the return type ofstd::from_chars
      (class)[edit]
      the return type ofstd::to_chars
      (class)[edit]

      Functions

      (C++17)
      converts a character sequence to an integer or floating-point value
      (function)[edit]
      (C++17)
      converts an integer or floating-point value to a character sequence
      (function)[edit]

      [edit]Synopsis

      namespace std{// floating-point format for primitive numerical conversionenumclass chars_format{    scientific=/* unspecified */,    fixed=/* unspecified */,    hex=/* unspecified */,    general= fixed| scientific};  // primitive numerical output conversionstruct to_chars_result{// freestandingchar* ptr;    errc ec;friendbool operator==(const to_chars_result&,const to_chars_result&)=default;constexprexplicit operatorbool()constnoexcept{return ec== errc{};}}; constexpr  to_chars_result to_chars(char* first,char* last,// freestanding/* integer-type */ value,int base=10);  to_chars_result to_chars(char* first,char* last,// freestandingbool value,int base=10)= delete;  to_chars_result to_chars(char* first,char* last,// freestanding-deleted/* floating-point-type */ value);  to_chars_result to_chars(char* first,char* last,// freestanding-deleted/* floating-point-type */ value, chars_format fmt);  to_chars_result to_chars(char* first,char* last,// freestanding-deleted/* floating-point-type */ value,                           chars_format fmt,int precision); // primitive numerical input conversionstruct from_chars_result{// freestandingconstchar* ptr;    errc ec;friendbool operator==(const from_chars_result&,const from_chars_result&)=default;constexprexplicit operatorbool()constnoexcept{return ec== errc{};}}; constexpr  from_chars_result from_chars(constchar* first,// freestandingconstchar* last,/* integer-type */& value,int base=10);  from_chars_result from_chars(constchar* first,// freestanding-deletedconstchar* last,/* floating-point-type */& value,                               chars_format fmt= chars_format::general);}
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/header/charconv&oldid=179095"

      [8]ページ先頭

      ©2009-2025 Movatter.jp