From Jason Turner

[re.submatch]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp2cuorc5c/{from.md → to.md} +21 -0
tmp/tmp2cuorc5c/{from.md → to.md} RENAMED
@@ -1,7 +1,9 @@
1
  ## Class template `sub_match` <a id="re.submatch">[[re.submatch]]</a>
2
 
 
 
3
  Class template `sub_match` denotes the sequence of characters matched by
4
  a particular marked sub-expression.
5
 
6
  ``` cpp
7
  namespace std {
@@ -24,10 +26,12 @@ namespace std {
24
  string_type str() const;
25
 
26
  int compare(const sub_match& s) const;
27
  int compare(const string_type& s) const;
28
  int compare(const value_type* s) const;
 
 
29
  };
30
  }
31
  ```
32
 
33
  ### Members <a id="re.submatch.members">[[re.submatch.members]]</a>
@@ -73,10 +77,27 @@ int compare(const string_type& s) const;
73
  int compare(const value_type* s) const;
74
  ```
75
 
76
  *Returns:* `str().compare(s)`.
77
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  ### Non-member operators <a id="re.submatch.op">[[re.submatch.op]]</a>
79
 
80
  Let `SM-CAT(I)` be
81
 
82
  ``` cpp
 
1
  ## Class template `sub_match` <a id="re.submatch">[[re.submatch]]</a>
2
 
3
+ ### General <a id="re.submatch.general">[[re.submatch.general]]</a>
4
+
5
  Class template `sub_match` denotes the sequence of characters matched by
6
  a particular marked sub-expression.
7
 
8
  ``` cpp
9
  namespace std {
 
26
  string_type str() const;
27
 
28
  int compare(const sub_match& s) const;
29
  int compare(const string_type& s) const;
30
  int compare(const value_type* s) const;
31
+
32
+ void swap(sub_match& s) noexcept(see below);
33
  };
34
  }
35
  ```
36
 
37
  ### Members <a id="re.submatch.members">[[re.submatch.members]]</a>
 
77
  int compare(const value_type* s) const;
78
  ```
79
 
80
  *Returns:* `str().compare(s)`.
81
 
82
+ ``` cpp
83
+ void swap(sub_match& s) noexcept(see below);
84
+ ```
85
+
86
+ *Preconditions:* `BidirectionalIterator` meets the *Cpp17Swappable*
87
+ requirements [[swappable.requirements]].
88
+
89
+ *Effects:* Equivalent to:
90
+
91
+ ``` cpp
92
+ this->pair<BidirectionalIterator, BidirectionalIterator>::swap(s);
93
+ std::swap(matched, s.matched);
94
+ ```
95
+
96
+ *Remarks:* The exception specification is equivalent to
97
+ `is_nothrow_swappable_v<BidirectionalIterator>`.
98
+
99
  ### Non-member operators <a id="re.submatch.op">[[re.submatch.op]]</a>
100
 
101
  Let `SM-CAT(I)` be
102
 
103
  ``` cpp