Skip to content

Commit 1bdcc98

Browse files
author
Dawn Perchik
committed
LWG3364 Initialize data members of ranges and their iterators
1 parent db3a604 commit 1bdcc98

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
@@ -4264,7 +4264,7 @@
42644264
// \ref{range.take.while.sentinel}, class template \tcode{take_while_view::\exposid{sentinel}}
42654265
template<bool> class @\exposid{sentinel}@; // \expos
42664266

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

42704270
public:
@@ -4451,8 +4451,8 @@
44514451
return s < c ? 0 : s - c;
44524452
}
44534453
private:
4454-
V @\exposid{base_}@; // \expos
4455-
range_difference_t<V> @\exposid{count_}@; // \expos
4454+
V @\exposid{base_}@ = V(); // \expos
4455+
range_difference_t<V> @\exposid{count_}@ = 0; // \expos
44564456
};
44574457

44584458
template<class R>
@@ -4557,7 +4557,7 @@
45574557
{ return ranges::end(@\exposid{base_}@); }
45584558

45594559
private:
4560-
V @\exposid{base_}@; // \expos
4560+
V @\exposid{base_}@ = V(); // \expos
45614561
@\placeholder{semiregular-box}@<Pred> @\exposid{pred_}@; @\itcorr[-1]@ // \expos
45624562
};
45634563

@@ -6047,7 +6047,7 @@
60476047
using @\exposid{base-t}@ = conditional_t<Const, const V, V>; // \expos
60486048
friend @\exposid{iterator}@<!Const>;
60496049

6050-
iterator_t<@\exposid{base-t}@> @\exposid{current_}@;
6050+
iterator_t<@\exposid{base-t}@> @\exposid{current_}@ = iterator_t<@\exposid{base-t}@>();
60516051
public:
60526052
using iterator_category = typename iterator_traits<iterator_t<@\exposid{base-t}@>>::iterator_category;
60536053
using value_type = remove_cvref_t<tuple_element_t<N, range_value_t<@\exposid{base-t}@>>>;

0 commit comments

Comments
 (0)