GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • cpprefjp - C++日本語リファレンス
  • GitHub Project

This view

  • Original page
  • New address

GeezerVison is showing cpprefjp.github.io — std::chars_format - cpprefjp C++日本語リファレンス

  1. リファレンス
  2. charconv
  3. chars_format

最終更新日時: 2024年06月11日 22時45分38秒 (JST)
Akira Takahashi が更新

履歴 編集

enum
<charconv>

std::chars_format(C++17)

namespace std {
  enum class chars_format {
    scientific = /*unspecified*/,
    fixed = /*unspecified*/,
    hex = /*unspecified*/,
    general = fixed | scientific
  };
}

概要

to_charsの出力、from_charsの入力の文字列のフォーマット種別を指定するビットマスクの列挙体。

各メンバはprintfのフォーマット指定子のいずれかに対応し、主に浮動小数点数の表記について指定する。ただし、桁数(精度)については該当関数の引数で別途指定する。

メンバの値は未規定(実装によって異なる可能性がある)。

列挙値 対応するフォーマット指定子 説明 対応バージョン
scientific %e 指数形式 C++17
fixed %f 固定小数形式 C++17
hex %a 16進浮動小数(先頭に0xはつかない) C++17
general %g 指数形式と固定小数形式のどちらか最適な方を選択 C++17

バージョン

言語

  • C++17

処理系

  • Clang: ??
  • GCC: ??
  • Visual C++: 2017 update 8 ✅

関連項目

  • to_chars
  • from_chars

参照

  • P0067R5: Elementary string conversions, revision 5
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.