Skip to content

Commit 56b4256

Browse files
author
Dawn Perchik
committed
LWG3364 Initialize data members of ranges and their iterators
1 parent 43876c3 commit 56b4256

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

source/ranges.tex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4332,7 +4332,7 @@
43324332
// \ref{range.take.while.sentinel}, class template \tcode{take_while_view::\exposid{sentinel}}
43334333
template<bool> class @\exposid{sentinel}@; // \expos
43344334

4335-
V @\exposid{base_}@; // \expos
4335+
V @\exposid{base_}@ = V(); // \expos
43364336
@\placeholder{semiregular-box}@<Pred> @\exposid{pred_}@; @\itcorr[-1]@ // \expos
43374337

43384338
public:
@@ -4519,8 +4519,8 @@
45194519
return s < c ? 0 : s - c;
45204520
}
45214521
private:
4522-
V @\exposid{base_}@; // \expos
4523-
range_difference_t<V> @\exposid{count_}@; // \expos
4522+
V @\exposid{base_}@ = V(); // \expos
4523+
range_difference_t<V> @\exposid{count_}@ = 0; // \expos
45244524
};
45254525

45264526
template<class R>
@@ -4625,7 +4625,7 @@
46254625
{ return ranges::end(@\exposid{base_}@); }
46264626

46274627
private:
4628-
V @\exposid{base_}@; // \expos
4628+
V @\exposid{base_}@ = V(); // \expos
46294629
@\placeholder{semiregular-box}@<Pred> @\exposid{pred_}@; @\itcorr[-1]@ // \expos
46304630
};
46314631

@@ -6165,7 +6165,7 @@
61656165
using @\exposid{base-t}@ = conditional_t<Const, const V, V>; // \expos
61666166
friend @\exposid{iterator}@<!Const>;
61676167

6168-
iterator_t<@\exposid{base-t}@> @\exposid{current_}@;
6168+
iterator_t<@\exposid{base-t}@> @\exposid{current_}@ = iterator_t<@\exposid{base-t}@>();
61696169
public:
61706170
using iterator_category = typename iterator_traits<iterator_t<@\exposid{base-t}@>>::iterator_category;
61716171
using value_type = remove_cvref_t<tuple_element_t<N, range_value_t<@\exposid{base-t}@>>>;

0 commit comments

Comments
 (0)