Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::match_results<BidirIt,Alloc>::match_results

      From cppreference.com
      <cpp‎ |regex‎ |match results
       
       
       
      Regular expressions library
      Classes
      (C++11)
      Algorithms
      Iterators
      Exceptions
      Traits
      Constants
      (C++11)
      Regex Grammar
       
       
      match_results(): match_results(Allocator()){}
      (1)
      explicit match_results(const Allocator& a);
      (2)
      match_results(const match_results& rhs);
      (3)
      match_results(const match_results& rhs,const Allocator& a);
      (4)
      match_results( match_results&& rhs)noexcept;
      (5)
      match_results( match_results&& rhs,const Allocator& a);
      (6)
      1,2) Constructs a match result with no established result state.
      1) The default constructor.
      2) Constructs the match result using a copy ofa as the allocator.
      When the construction finishes,ready() returnsfalse andsize() returns0.
      3-6) Constructs a match result fromrhs.
      3) The copy constructor.
      4) Constructs the match result using a copy ofa as the allocator.
      5) The move constructor. When the construction finishes,rhs is in a valid but unspecified state.
      6) Constructs the match result using a copy ofa as the allocator. When the construction finishes,rhs is in a valid but unspecified state.
      Given the value ofrhs before the construction asm and any integer in[0m.size()) asn, when the construction finishes, the following member functions should return the specified values:
       Member function Value
      ready()m.ready()
      size()m.size()
      str(n)m.str(n)
      prefix()m.prefix()
      suffix()m.suffix()
      operator[](n)m[n]
      length(n)m.length(n)
      position(n) m.position(n) 

      Contents

      [edit]Parameters

      a - allocator to use for all memory allocations of this container
      rhs - anothermatch_results to use as source to initialize thematch_results with

      [edit]Exceptions

      1-4) May throw implementation-defined exceptions.
      6) Throws nothing ifa== rhs.get_allocator() istrue.

      [edit]Example

      This section is incomplete
      Reason: no example

      [edit]Defect reports

      The following behavior-changing defect reports were applied retroactively to previously published C++ standards.

      DRApplied toBehavior as publishedCorrect behavior
      LWG 2191C++11n could be negative in the postconditions of overloads(3-6)can only be non-negative
      LWG 2195C++11the constructors required byAllocatorAwareContainer were missingadded
      P0935R0C++11default constructor was explicitmade implicit
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/regex/match_results/match_results&oldid=177533"

      [8]ページ先頭

      ©2009-2026 Movatter.jp