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

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

Open
yuxianch opened this issue Aug 19, 2020 · 0 comments

Comments

@yuxianch
Copy link

With the latest version of clang-cl, algorithm.cpp get failed with clang-cl on Windows for "declaration does not declare anything".
Related code:

range/test/algorithm.cpp

Lines 32 to 35 in 72e2a44

#ifdef _MSC_VER
template ::boost::counting_iterator<int>;
#pragma warning(pop)
#endif

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(llvm/llvm-project@1cbdf93).

yuxianch added a commit to yuxianch/range that referenced this issue Sep 8, 2021
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

No branches or pull requests

1 participant