Consider the following two statements:
namespace foo = bar;
and
namespace foo {
using namespace bar;
}
Are those two statements equivalent, or are there some subtle differences I’m not aware of?
(Please note that this is not a question about coding style – I’m just interested in C++ parsing).
This does not affect any name lookup rules. The only affect is to make ‘foo’ an alias to ‘bar’. for example:
The following does change lookup rules
When lookup takes place for ‘i’, ‘foo’ will be searched first, then ‘NS’ then ‘bar’.