Closed as not planned
Description
Probably not worth fixing, but well.
namespace vulkan {
}
namespace xcb {
struct ModifierMask {
static constexpr int Shift = 1;
};
} // namespace xcb
void test()
{
using S = vulkan::ModifierMask::Shift;
}
Gives (with clang HEAD 14.0.0, as well as version 13).
prog.cc:14:13: error: no member named 'ModifierMask' in namespace 'vulkan';
did you mean 'xcb::ModifierMask'?
using S = vulkan::ModifierMask::Shift;
^~~~~~~~~~~~~~~~~~~~
xcb::ModifierMask
prog.cc:6:8: note: 'xcb::ModifierMask' declared here
struct ModifierMask {
^
prog.cc:14:35: error: no type named 'Shift' in 'xcb::ModifierMask'
using S = vulkan::ModifierMask::Shift;
~~~~~~~~~~~~~~^
2 errors generated.
gcc HEAD reports:
prog.cc: In function 'void test()':
prog.cc:14:21: error: 'ModifierMask' in namespace 'vulkan' does not name a type
14 | using S = vulkan::ModifierMask::Shift;
| ^~~~~~~~~~~~
and leaves it at that.
The "bug" is that clang says that there isn't a type 'Shift' in 'xcb::ModifierMask' while there is no 'xcb::ModifierMask' insight imho. The actual problem was me forgetting to include the header that defines 'vulkan::ModifierMask::Shift'.