Summary: | C++11: missing support for inline namespaces | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | meyerm |
Component: | Language Support: CPP (old) | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | aleixpol |
Priority: | NOR | ||
Version: | 4.5.1 | ||
Target Milestone: | 4.3.0 | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kdevelop/b6412bb844e23679ced188b923816c9b31677eb8 | Version Fixed In: | |
Sentry Crash Report: |
Description
meyerm
2013-06-13 11:00:43 UTC
The issue is due to missing support for inline namespaces: namespace a { inline namespace b { struct foo { static int bar() { return 0; } }; } } int main() { return a::foo::bar(); } This compiles fine but shows the same issue as std::chrono. Note that most of std::chrono from GCC is wrapped in an inline namespace _V2. Git commit b6412bb844e23679ced188b923816c9b31677eb8 by Milian Wolff. Committed on 20/10/2013 at 15:08. Pushed by mwolff into branch 'master'. C++11: Add implicit using directive for inline namespaces. This fixes association of uses etc. to contents in inline namespaces, which is the case for e.g. most of the stuff in std::chrono. Note: Code completion of items in an inline namespace nested in another namespace (such as is the case for stuff in std::chrono::_V2) does not show up properly yet. M +14 -1 languages/cpp/cppduchain/declarationbuilder.cpp M +1 -0 languages/cpp/cppduchain/tests/test_duchain.h M +21 -0 languages/cpp/cppduchain/tests/test_duchain_cpp2011.cpp http://commits.kde.org/kdevelop/b6412bb844e23679ced188b923816c9b31677eb8 Git commit 83aee7320a201f44f1d94a1dec02338d5869ac1a by Milian Wolff. Committed on 20/10/2013 at 16:35. Pushed by mwolff into branch 'master'. Also take namespace imports into account for code completion after :: This should solve quite a few other related code completion issues. Note that this code was there already for the "global" code completion, but as soon as you picked a namespace from the list, you'd loose all imported items. M +42 -27 languages/cpp/codecompletion/context.cpp M +4 -0 languages/cpp/codecompletion/context.h M +10 -0 languages/cpp/tests/test_cppcodecompletion.cpp M +1 -0 languages/cpp/tests/test_cppcodecompletion.h http://commits.kde.org/kdevelop/83aee7320a201f44f1d94a1dec02338d5869ac1a |