-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
A conflict of name lookup when building with Visual Studio 2015 #505
Comments
I could be wrong here, but according to the two phase lookup rules, an unqualified name in a template should not be deferred to instantiation, i.e. not look at the base class. However, MSVC has not implemented two phase lookup yet. If replacing |
Thanks for your explanation and I'm happy to learn something new. Agree with your solution. |
Please report if it works now. |
It works. Thanks. |
LOL, really? |
I'm using fmt library with Visual Studio 2015 (Microsoft C/C++ Optimizing Compiler version 19.00.24215.1) and I meet some error like this:
type
fmt::ArgVisitor<Impl, Result>::Arg [with Impl=Impl, Result=void]
here is inaccessible detected during instantiation of classfmt::internal::ArgFormatterBase<Impl, Char> [with Impl=Impl, Char=Char]
.However, the same codes can be compiled with gcc.
I trace the codes and find that in class
internal::ArgFormatterBase
(atformat.h:1949
), it uses typeArg
without namespace scope qualifierinternal::
. However, its base classArgVisitor
has a private declarationtypedef internal::Arg Arg
(atformat.h:1567
). So the compiler finds the privateArg
and thinks it's not accessible.I read the C++ standard and do not find that whether compiler should continue searching the namespace scope after finding a name that is not accessible.
I will seed a feedback to Visual Studio to find out is it a feature/bug of the compiler but I also want to get your opinions about changing the codes related to
internal::Args
.The text was updated successfully, but these errors were encountered: