cppfront icon indicating copy to clipboard operation
cppfront copied to clipboard

[BUG] using the_namespace_name::_ is ignored

Open germandiagogomez opened this issue 3 months ago • 2 comments

Describe the bug

When compiling, it appears this error, which I tried to fix by following the instructions:

"in Cpp2, write 'using the_namespace_name::' to bring all names in the namespace into scope using the '' wildcard (at 'using')"

It is ignored

To Reproduce Steps to reproduce the behavior:

Just add using namespace std::_; in any file and compile.

Additional context

Add any other context about the problem here.

germandiagogomez avatar Oct 06 '25 03:10 germandiagogomez

using namespace ...; is not valid cpp2 syntax. Instead you should write using some_namespace::_;

Also note that using some_namespace::_; cannot appear at global scope, if it does, it will be ignored by cppfront

LT2H avatar Oct 06 '25 04:10 LT2H

@LT2H It is ignored inside function boundaries as well.

germandiagogomez avatar Oct 06 '25 07:10 germandiagogomez