Namespace scope doesn't apply to variables
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
Research direction
No source files or tests are identified in the issue. Start by locating the implementation of namespace scope and variable name resolution, then reproduce the examples with global, test, and test2 variables. Done means qualified access such as test::something works and variables with the same name in different namespaces do not collide.
Written by the indexing model from the issue text.
Description
When a variable is defined inside a namespace, the namespace scope needs to be dropped to be able to access the variable
namespace test {
bool something = true;
bool setting in;
}
//way to access
something = false;
setting = true;
//expected way to access
test::something = false;
test::setting = true;
It also means that it is impossible to use namespaces to separate different instances of variables. In the below example, all three instances of 'something' collide with each other
bool something = true;
namespace test {
bool something = true;
}
namespace test2 {
bool something = true;
}
- Dominant language
- C++
- Stars
- 278
- Forks
- 77
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 9
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from WerWolv/PatternLanguage
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
WerWolv/PatternLanguage#236 · 12 comments ·
Maintainers usually reply within 2 days
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
WerWolv/PatternLanguage#226 · 3 comments ·
Maintainers usually reply within 2 days
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
WerWolv/PatternLanguage#221 · 4 comments ·
Maintainers usually reply within 2 days
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
WerWolv/PatternLanguage#219 ·
Maintainers usually reply within 2 days
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
WerWolv/PatternLanguage#218 ·
Maintainers usually reply within 2 days
All issues in WerWolv/PatternLanguage
Similar issues
-
CI tracking issue
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
espressif/esp-matter#1874 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
KavrakiLab/vamp#126 ·
-
cudev: Fix MSVC build failures with 64-bit integers (int64_t/uint64_t) in vec_traits.hppPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
opencv/opencv_contrib#4231 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
MiSTer-devel/Main_MiSTer#1341 ·
Maintainers usually reply within 1 day