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

using namespace has the wrong scope? #259

Closed
sean-mcmanus opened this issue Jun 26, 2019 · 6 comments
Closed

using namespace has the wrong scope? #259

sean-mcmanus opened this issue Jun 26, 2019 · 6 comments
Labels
🐛 Bug Something isn't working

Comments

@sean-mcmanus
Copy link

Is this a bug? I'm seeing using namespace have some "parameter" TM scope instead of the previous scopes.

image

@jeff-hykin
Copy link
Owner

jeff-hykin commented Jun 26, 2019

that shouldn't be the case (there must be a bug), what is the full code snippet?

@jeff-hykin jeff-hykin added the 🐛 Bug Something isn't working label Jun 26, 2019
@sean-mcmanus
Copy link
Author

Oh strange -- the code appeared to be just the 1st line in a method, so I assumed the repro was easy, but I just tried a simple project and it's not reproing, so it looks like something early on our code is causing some failure. I'll see if I can get an isolated repro....

@sean-mcmanus
Copy link
Author

Here's a repro below -- the lambda is causing breakage on all "using namespace" that occurs later on in the file -- using some incorrect parameter TM scopes:

#include <vector>
#include <string>
#include <memory>

class cc;
int func()
{
  auto a = [](std::vector<std::shared_ptr<cc>> c)
    {
    };
  using namespace std::literals;
}

@jeff-hykin
Copy link
Owner

jeff-hykin commented Jun 27, 2019

Ah it was the std::vector<std::shared_ptr<cc>> that was causing the issue. Thankfully this is already fixed in v1.12.3. Thanks for reporting this though. I've added the code to our tests

@matter123
Copy link
Collaborator

I can still reproduce this is 1.12.3.
Screenshot from 2019-06-26 17-49-01

@matter123 matter123 reopened this Jun 27, 2019
@jeff-hykin
Copy link
Owner

jeff-hykin commented Jun 27, 2019

Ah you're right good catch, the changes were made but not published yet. They're published now under v1.12.4

code

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

3 participants