最終更新日時:
が更新

履歴 編集

function
<locale>

std::locale::operator=

const locale& operator=(const locale& other) noexcept; // (1) C++98

概要

localeオブジェクトを代入する。

効果

*thisotherと同じロケールを表すようにする。以降、*thisotherは同じファセット集合を共有する。

戻り値

*this

例外

投げない。

#include <cassert>
#include <locale>

int main()
{
  std::locale a = std::locale::classic();
  std::locale b;

  b = a; // 代入

  assert(a == b);
}

出力

バージョン

言語

  • C++98

関連項目