Skip to content
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

Bugged output for namespace variable declaration #408

Closed
jeremy-rifkin opened this issue Jul 19, 2021 · 1 comment
Closed

Bugged output for namespace variable declaration #408

jeremy-rifkin opened this issue Jul 19, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@jeremy-rifkin
Copy link

The following program

namespace ns {
    extern int a;
};

int ns::a = 1;

Produces this output on cppinsights:

namespace ns
{
  extern int a;

}

int a = 1;

The output should be along the lines of:

namespace ns {
  extern int a;
}

namespace ns {
  int a = 1;
}
@andreasfertig
Copy link
Owner

Hello @jeremy-rifkin,

thanks for spotting this! Last week I realized that the scope was dropped for static data members but I did not think about a variable in a namespace. A fix is on its way.

Andreas

@andreasfertig andreasfertig added the bug Something isn't working label Jul 19, 2021
andreasfertig added a commit that referenced this issue Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants