Summary: | Classes declared in namespaces but defined outside are not imported | ||
---|---|---|---|
Product: | [Applications] umbrello | Reporter: | Daniele E. Domenichelli <ddomenichelli> |
Component: | general | Assignee: | Umbrello Development Group <umbrello-devel> |
Status: | RESOLVED NOT A BUG | ||
Severity: | normal | CC: | ralf.habacker |
Priority: | NOR | ||
Version: | 2.20.3 (KDE Applications 16.08.3) | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Daniele E. Domenichelli
2017-08-09 14:48:26 UTC
(In reply to Daniele E. Domenichelli from comment #0) > A class declared in this way: > > --- > namespace test { > class test; You declare class test to be a member of namespace test > } > > class test::foo You define a class foo inside test, which is not declared in namespace test above > { > test(); > }; > --- This is not supported by the c++ standard. See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4296.pdf 7.3.1.2 Namespace member definitions 2 Members of a named namespace can also be defined outside that namespace by explicit qualification of the name being defined, provided that the entity being defined was already declared in the namespace and the definition appears after the point of declaration in a namespace that encloses the declaration’s namespace. The correct c++ fragments looks then --- namespace test { class foo; } class test::foo { test(); }; ---- Importing this code creates class test::foo. You are right, sorry, that was all caused by a typo while trying to reproduce my issue that is actually different... The problem is that the classes are generated, but the methods are not imported for example see the difference in the classes foo and bar generated by this: --- namespace test { class foo; class bar { bar(); }; } // namespace test class test::foo { test(); }; --- (In reply to Daniele E. Domenichelli from comment #2) > The problem is that the classes are generated, but the methods are not > imported for example see the difference in the classes foo and bar generated > by this: This ticket covers a different issue and has already been closed. Please open a different bug report |