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

algorithm.cpp failed with clang-cl on Windows for "declaration does not declare anything"

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

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
compilers, testing

Research direction

Start with test/algorithm.cpp at lines 32-35 and compare it with the minimal test.cpp reproducer in the issue. Check the declaration against current clang-cl behavior and nearby Boost.Range tests, then run the relevant algorithm test with clang-cl on Windows. Done means the test compiles and passes without the declaration error.

Written by the indexing model from the issue text.

Description

With the latest version of clang-cl, algorithm.cpp get failed with clang-cl on Windows for "declaration does not declare anything".
Related code:
https://github.com/boostorg/range/blob/72e2a4457a13eba0b8cddd2e68f058f74bd3d890/test/algorithm.cpp#L32-L35
A small reproducer(test.cpp):

namespace boost {
  template <class T>
  class counting_iterator
  {};
}
template ::boost::counting_iterator<int>;

Error message:

ksh-3.2$ clang-cl -c test.cpp
test.cpp(6,10): error: declaration does not declare anything
template ::boost::counting_iterator<int>;
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

The code is considered as not accepted(https://github.com/llvm/llvm-project/commit/1cbdf932b41eb58ed94fbc240e93b63653d95bd3).

Dominant language
C++
Stars
45
Forks
104
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/range

All issues in boostorg/range

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.