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

履歴 編集

function
<regex>

std::sub_match::コンストラクタ(C++11)

constexpr sub_match();

概要

sub_match オブジェクトを構築する

要件

is_default_constructible<iterator>::value == true であること。

効果

各メンバ変数(firstsecondmatched)を値初期化する。

#include <iostream>
#include <regex>

int main()
{
  std::csub_match s;
  std::cout << std::boolalpha
            << (s.first == nullptr) << std::endl
            << (s.second == nullptr) << std::endl
            << s.matched << std::endl;
}

出力

true
true
false

バージョン

言語

  • C++11

処理系