• Class / Function / Type

      std::
    • Header file

      <>
    • Other / All

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

    履歴 編集

    function
    <locale>

    std::locale::operator==

    bool operator==(const locale& other) const; // (1) C++03
    

    概要

    localeオブジェクトの等値比較を行う。

    戻り値

    両方が同じロケールである場合、または一方が他方のコピーである場合、またはそれぞれに名前があり、名前が同一である場合はtrue、それ以外の場合はfalseを返す。

    #include <cassert>
    #include <locale>
    
    int main()
    {
      std::locale a = std::locale::classic();
      std::locale b = std::locale::classic();
      std::locale c("");
    
      assert(a == b);
      assert(!(a == c));
    }
    

    出力