Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

counting_iterator used as a forward iterator in <algorithm> generates warning in C++17

Open
#59 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp
Domain
tooling

Research direction

Reproduce the C++17 example with parallel std::for_each and inspect iterator_adaptor.hpp at line 318, where the warning is reported. Trace the counting_iterator operation that triggers the conversion warning and compare the relevant iterator behavior under C++17. Done means the example no longer emits C4244.

Written by the indexing model from the issue text.

Description

Following results in iterator_adaptor.hpp(318,1): warning C4244: '+=': conversion from '__int64' to 'Base', possible loss of data

std::for_each(std::execution::par, boost::counting_iterator<int>(0), boost::counting_iterator<int>(10), [&](int) {});

Dominant language
C++
Stars
23
Forks
70
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/iterator

All issues in boostorg/iterator

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.