• Class / Function / Type

      std::
    • Header file

      <>
    • Other / All

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

    履歴 編集

    function
    <regex>

    std::sub_match::コンストラクタ

    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

    処理系

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