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

履歴 編集

function
<filesystem>

std::filesystem::operator>=(C++17)

namespace std::filesystem {
  // operator<=>により、以下のオーバーロードが使用可能になる (C++20)
  bool operator>=(const path& lhs, const path& rhs) noexcept; // (1) C++17
}

概要

pathクラスにおいて、左辺が右辺以上かの判定を行う。

戻り値

return !(lhs < rhs);

#include <cassert>
#include <filesystem>

namespace fs = std::filesystem;

int main()
{
  fs::path a = "a/b/d";
  fs::path b = "a/b/c";

  assert(a >= b);
  assert(a >= a);
}

出力

バージョン

言語

  • C++17

処理系

参照