Skip to content

Commit 50a4c61

Browse files
author
Stefanus Du Toit
committed
LWG2332 regex_iterator/regex_token_iterator should forbid temporary regexes
1 parent e5aa568 commit 50a4c61

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

source/regex.tex

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3623,6 +3623,10 @@
36233623
const regex_type& re,
36243624
regex_constants::match_flag_type m =
36253625
regex_constants::match_default);
3626+
regex_iterator(BidirectionalIterator a, BidirectionalIterator b,
3627+
const regex_type&& re,
3628+
regex_constants::match_flag_type m =
3629+
regex_constants::match_default) = delete;
36263630
regex_iterator(const regex_iterator&);
36273631
regex_iterator& operator=(const regex_iterator&);
36283632
bool operator==(const regex_iterator&) const;
@@ -3902,6 +3906,27 @@
39023906
const int (&submatches)[N],
39033907
regex_constants::match_flag_type m =
39043908
regex_constants::match_default);
3909+
regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b,
3910+
const regex_type&& re,
3911+
int submatch = 0,
3912+
regex_constants::match_flag_type m =
3913+
regex_constants::match_default) = delete;
3914+
regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b,
3915+
const regex_type&& re,
3916+
const std::vector<int>& submatches,
3917+
regex_constants::match_flag_type m =
3918+
regex_constants::match_default) = delete;
3919+
regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b,
3920+
const regex_type&& re,
3921+
initializer_list<int> submatches,
3922+
regex_constants::match_flag_type m =
3923+
regex_constants::match_default) = delete;
3924+
template <std::size_t N>
3925+
regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b,
3926+
const regex_type&& re,
3927+
const int (&submatches)[N],
3928+
regex_constants::match_flag_type m =
3929+
regex_constants::match_default) = delete;
39053930
regex_token_iterator(const regex_token_iterator&);
39063931
regex_token_iterator& operator=(const regex_token_iterator&);
39073932
bool operator==(const regex_token_iterator&) const;

0 commit comments

Comments
 (0)