Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      deduction guides forstd::basic_regex

      From cppreference.com
      <cpp‎ |regex‎ |basic regex
       
       
       
      Regular expressions library
      Classes
      (C++11)
      Algorithms
      Iterators
      Exceptions
      Traits
      Constants
      (C++11)
      Regex Grammar
       
       
      Defined in header<regex>
      template<class ForwardIt>

      basic_regex( ForwardIt, ForwardIt,
                   std::regex_constants::syntax_option_type=std::regex_constants::ECMAScript)

      -> basic_regex<typenamestd::iterator_traits<ForwardIt>::value_type>;
      (since C++17)

      Thisdeduction guide is provided forstd::basic_regex to allow deduction from an iterator range.

      [edit]Example

      Run this code
      #include <regex>#include <vector> int main(){std::vector<char> v={'a','b','c'};std::basic_regex re(v.begin(), v.end());// uses explicit deduction guide}
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/regex/basic_regex/deduction_guides&oldid=161255"

      [8]ページ先頭

      ©2009-2025 Movatter.jp