Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[specialized.algorithms] for loop bodies inconsistently a compound-statement #4053

Closed
JohelEGP opened this issue Jun 20, 2020 · 1 comment · Fixed by #4161
Closed

[specialized.algorithms] for loop bodies inconsistently a compound-statement #4053

JohelEGP opened this issue Jun 20, 2020 · 1 comment · Fixed by #4161
Assignees

Comments

@JohelEGP
Copy link
Contributor

4 compound-statemets vs 14 expression-statements.

draft/source/algorithms.tex

Lines 10224 to 10228 in 3a3350e

\begin{codeblock}
for (; first != last; ++first)
::new (@\placeholdernc{voidify}@(*first))
typename iterator_traits<NoThrowForwardIterator>::value_type;
\end{codeblock}

draft/source/algorithms.tex

Lines 10247 to 10251 in 3a3350e

\begin{codeblock}
for (; first != last; ++first)
::new (@\placeholdernc{voidify}@(*first)) remove_reference_t<iter_reference_t<I>>;
return first;
\end{codeblock}

draft/source/algorithms.tex

Lines 10264 to 10268 in 3a3350e

\begin{codeblock}
for (; n > 0; (void)++first, --n)
::new (@\placeholdernc{voidify}@(*first))
typename iterator_traits<NoThrowForwardIterator>::value_type;
return first;

draft/source/algorithms.tex

Lines 10303 to 10307 in 3a3350e

\begin{codeblock}
for (; first != last; ++first)
::new (@\placeholdernc{voidify}@(*first))
typename iterator_traits<NoThrowForwardIterator>::value_type();
\end{codeblock}

draft/source/algorithms.tex

Lines 10326 to 10330 in 3a3350e

\begin{codeblock}
for (; first != last; ++first)
::new (@\placeholdernc{voidify}@(*first)) remove_reference_t<iter_reference_t<I>>();
return first;
\end{codeblock}

draft/source/algorithms.tex

Lines 10343 to 10348 in 3a3350e

\begin{codeblock}
for (; n > 0; (void)++first, --n)
::new (@\placeholdernc{voidify}@(*first))
typename iterator_traits<NoThrowForwardIterator>::value_type();
return first;
\end{codeblock}

draft/source/algorithms.tex

Lines 10387 to 10391 in 3a3350e

\begin{codeblock}
for (; first != last; ++result, (void) ++first)
::new (@\placeholdernc{voidify}@(*result))
typename iterator_traits<NoThrowForwardIterator>::value_type(*first);
\end{codeblock}

draft/source/algorithms.tex

Lines 10421 to 10426 in 3a3350e

\begin{codeblock}
for (; ifirst != ilast && ofirst != olast; ++ofirst, (void)++ifirst) {
::new (@\placeholdernc{voidify}@(*ofirst)) remove_reference_t<iter_reference_t<O>>(*ifirst);
}
return {std::move(ifirst), ofirst};
\end{codeblock}

draft/source/algorithms.tex

Lines 10444 to 10449 in 3a3350e

\begin{codeblock}
for ( ; n > 0; ++result, (void) ++first, --n) {
::new (@\placeholdernc{voidify}@(*result))
typename iterator_traits<NoThrowForwardIterator>::value_type(*first);
}
\end{codeblock}

draft/source/algorithms.tex

Lines 10499 to 10504 in 3a3350e

\begin{codeblock}
for (; first != last; (void)++result, ++first)
::new (@\placeholdernc{voidify}@(*result))
typename iterator_traits<NoThrowForwardIterator>::value_type(std::move(*first));
return result;
\end{codeblock}

draft/source/algorithms.tex

Lines 10530 to 10535 in 3a3350e

\begin{codeblock}
for (; ifirst != ilast && ofirst != olast; ++ofirst, (void)++ifirst) {
::new (@\placeholder{voidify}@(*ofirst))
remove_reference_t<iter_reference_t<O>>(ranges::iter_move(ifirst));
}
return {std::move(ifirst), ofirst};

draft/source/algorithms.tex

Lines 10560 to 10564 in 3a3350e

\begin{codeblock}
for (; n > 0; ++result, (void) ++first, --n)
::new (@\placeholdernc{voidify}@(*result))
typename iterator_traits<NoThrowForwardIterator>::value_type(std::move(*first));
return {first, result};

draft/source/algorithms.tex

Lines 10612 to 10616 in 3a3350e

\begin{codeblock}
for (; first != last; ++first)
::new (@\placeholdernc{voidify}@(*first))
typename iterator_traits<NoThrowForwardIterator>::value_type(x);
\end{codeblock}

draft/source/algorithms.tex

Lines 10634 to 10639 in 3a3350e

\begin{codeblock}
for (; first != last; ++first) {
::new (@\placeholdernc{voidify}@(*first)) remove_reference_t<iter_reference_t<I>>(x);
}
return first;
\end{codeblock}

draft/source/algorithms.tex

Lines 10652 to 10657 in 3a3350e

\begin{codeblock}
for (; n--; ++first)
::new (@\placeholdernc{voidify}@(*first))
typename iterator_traits<NoThrowForwardIterator>::value_type(x);
return first;
\end{codeblock}

draft/source/algorithms.tex

Lines 10738 to 10741 in 3a3350e

\begin{codeblock}
for (; first != last; ++first)
destroy_at(addressof(*first));
\end{codeblock}

draft/source/algorithms.tex

Lines 10760 to 10764 in 3a3350e

\begin{codeblock}
for (; first != last; ++first)
destroy_at(addressof(*first));
return first;
\end{codeblock}

draft/source/algorithms.tex

Lines 10777 to 10781 in 3a3350e

\begin{codeblock}
for (; n > 0; (void)++first, --n)
destroy_at(addressof(*first));
return first;
\end{codeblock}

@jensmaurer
Copy link
Member

It seems not having the braces is the path to consistency incurring the least changes.

@jensmaurer jensmaurer self-assigned this Sep 8, 2020
@jensmaurer jensmaurer changed the title [specialized.algorithms] for loop bodies incosistently a compound-statement [specialized.algorithms] for loop bodies inconsistently a compound-statement Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants