最終更新日時:
が更新

履歴 編集

function
<regex>

std::basic_regex::デストラクタ(C++11)

~basic_regex();

概要

正規表現オブジェクトを破棄する。

効果

正規表現オブジェクトを破棄する。

例

#include <iostream>
#include <regex>

int main()
{
  const char s[] = " abc ";
  std::cout << std::boolalpha;

  const std::regex re("ABC", std::regex_constants::icase);
  std::cout << std::regex_search(s, re) << std::endl;

  // スコープの終わりで破棄される。
}

出力

true

バージョン

言語

  • C++11

処理系

  • Clang: 3.0 ✅, 3.1 ✅, 3.2 ✅, 3.3 ✅, 3.4 ✅, 3.5 ✅, 3.6 ✅
  • GCC: 4.9.0 ✅, 4.9.1 ✅, 4.9.2 ✅, 5.0.0 ✅
  • Visual C++: ??