最終更新日時(UTC):
が更新

履歴 編集

function
<text_encoding>

std::text_encoding::mib(C++26)

constexpr id mib() const noexcept;

概要

エンコーディングのMIB(Management Information Base)列挙値を取得する。

戻り値

mib_を返す。

例外

投げない。

#include <text_encoding>
#include <print>

int main() {
  auto enc = std::text_encoding::literal();
  std::println("MIB: {}", static_cast<int>(enc.mib()));

  if (enc.mib() == std::text_encoding::id::UTF8) {
    std::println("Literal encoding is UTF-8");
  }
}

出力例

MIB: 106
Literal encoding is UTF-8

バージョン

言語

  • C++26

処理系

参照