Skip to content

Duplicate "no template named" error #24786

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

Closed
dnovillo opened this issue Aug 10, 2015 · 1 comment
Closed

Duplicate "no template named" error #24786

dnovillo opened this issue Aug 10, 2015 · 1 comment
Labels
bugzilla Issues migrated from bugzilla clang:frontend Language frontend issues, e.g. anything involving "Sema"

Comments

@dnovillo
Copy link

dnovillo commented Aug 10, 2015

Bugzilla Link 24412
Version unspecified
OS All

Extended Description

The following code snippet generates two instances of the same error message. This happens with Clang trunk as of today.

$ ./clang++ --version
clang version 3.8.0 (trunk 244446) (llvm/trunk 244449)
Target: x86_64-unknown-linux-gnu
Thread model: posix

$ cat dup.cpp

namespace x82 {
template <int, typename x94>
void WithArgs(x94);
}
void x123() { WithArgs<1>(x123); }
$ ./clang++ -c -std=c++11 dup.cpp
dup.cpp:5:15: error: no template named 'WithArgs'; did you mean 'x82::WithArgs'?
void x123() { WithArgs<1>(x123); }
              ^~~~~~~~
              x82::WithArgs
dup.cpp:3:6: note: 'x82::WithArgs' declared here
void WithArgs(x94);
     ^
dup.cpp:5:15: error: no template named 'WithArgs'; did you mean 'x82::WithArgs'?
void x123() { WithArgs<1>(x123); }
              ^~~~~~~~
              x82::WithArgs
dup.cpp:3:6: note: 'x82::WithArgs' declared here
void WithArgs(x94);
     ^
2 errors generated.
@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
@shafik
Copy link
Collaborator

shafik commented May 9, 2025

This looks fixed: https://godbolt.org/z/Kn1sEsdbz

Looks like it was fixed after clang-8.1: https://godbolt.org/z/znhx7seaf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang:frontend Language frontend issues, e.g. anything involving "Sema"
Projects
None yet
Development

No branches or pull requests

2 participants