Skip to content

A conflict of name lookup when building with Visual Studio 2015 #505

Closed
@straywarrior

Description

@straywarrior

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 class fmt::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 (at format.h:1949), it uses type Arg without namespace scope qualifier internal::. However, its base class ArgVisitor has a private declaration typedef internal::Arg Arg (at format.h:1567). So the compiler finds the private Arg 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions