Questions tagged [qualified-name]

A name that includes the full path of the containing class, eg java.util.ArrayList

Analogous the an absolute path in a filesystem, the name includes the full path of the containing/enclosing class.

62 questions
2
votes
3 answers

The name lookup followed after qualified declarator-id

I'm trying to understand what does the following quote mean (3.4.3/3 N3797): names following the qualified-id are looked up in the scope of the member’s class or namespace. namespace A { class C { public: static const int…
user2953119
2
votes
1 answer

Name lookup rules for nested-name-specifier

I've read the following (3.4.3/1): If a :: scope resolution operator in a nested-name-specifier is not preceded by a decltype-specifier, lookup of the name preceding that :: considers only namespaces, types, and templates whose specializations …
user2953119
2
votes
2 answers

Why is creation of syntactically illegal QNames permitted in java serialization frameworks?

I've been running into a lot of JAXB serialization errors that are caused by the fact that code is creating invalid qualified names in various places. I'm investigating the API I'm using and other java XML options, and one thing that's strange is…
FrobberOfBits
  • 17,634
  • 4
  • 52
  • 86
1
vote
2 answers

Parsing wsdl (retrieve namespaces from the definitions)using an Element Tree

I am trying to parse a wsdl file using ElementTree, As part of this I"d like to retrieve all the namespaces from a given wsdl definitions element. For instance in the below snippet , I am trying to retrieve all the namespaces in the definitions…
VJ23
  • 13
  • 1
  • 3
1
vote
1 answer

C++ Scope operator inside classes

I have some c++ code that I am analyzing and I came across something I don't know what it means. I have a class like this class A { public: int I; void function(); } void A::function() { cout << A::I; } Neither the function nor I…
1
vote
1 answer

Qualified names for Julia's `Base` functions/types

Some C++ developers strongly suggest to never use using namespace std, as they prefer to explicitly include the namespace of every function in their code. Reasons for this include clarity when reading code as well as preventing shadowing definitions…
JustLearning
  • 1,435
  • 1
  • 1
  • 9
1
vote
1 answer

Undefined Reference in C++ using static class

I've been looking for an answer to this for several hours. Even though I have a workaround I'd like to understand the problem. I get an undefined reference error when linking the following: .h: class Test { public: class Class1 { …
1
vote
1 answer

Why is a qualified name required after the second level of inheritance?

I ran into a problem, that I somehow managed to solve, but still would like to understand the language and the reasoning behind it. I have the following system of three classes: File class_a.hpp #pragma once class A { public: A(); }; File…
Marty Cagas
  • 350
  • 5
  • 14
1
vote
1 answer

How can I qualify or hold to a higher precedence a method not provided by a trait?

I have an Add implementation that looks like this, impl> Add for Sequence { type Output = Self; fn add(self, rhs: T) -> Self::Output { let mut o = self.clone(); o.myadd(rhs.into()).unwrap(); o } } The function…
Evan Carroll
  • 78,363
  • 46
  • 261
  • 468
1
vote
1 answer

Why is there an access error when trying to access a protected member of a base template class?

It works fine with regular classes: class Base { public: Base() {} protected: int* a; }; class Derived : public Base { public: Derived() {} void foo() { int** pa = &a; } }; int main() { Derived* d = new Derived(); …
KindFrog
  • 358
  • 4
  • 17
1
vote
3 answers

Incomplete type error when compiled with g++

I am trying to execute following code using g++ and getting incomplete type error #include struct try_main{ union{ struct try_inner_one{ int fl; float g; }one; struct try_inner_two{ char a; }two; }un; …
Karthik K M
  • 619
  • 2
  • 9
  • 24
1
vote
1 answer

Qualified name lookup in the name

I want to understand the namespace qualified name lookup rule. I'm trying to do that on the example: namespace A { int a=::b; //error: ‘::b’ has not been declared } int b=6; There is a quote which I rely in my reasoning (3.4.3.2/2 N3797): For…
user2953119
1
vote
1 answer

C++ return types and type names

I have the following code: #include #include struct H { static const int Index = 0; }; struct V { static const int Index = 1; }; struct Slice { Slice(): Value(5) { } int Value; }; class Dimension { public: …
user673679
  • 1,327
  • 1
  • 16
  • 35
1
vote
0 answers

How to shorten long (qualified) identifiers in C++?

In Java, I find it very straightforward to use namespaces. For each qualified identifier Ident I use in a source file, I put an import ns1.ns2.ns2.ns3.ns4.Ident; at the top of the file. Then I can use (short) unqualified names everywhere in my…
user1494080
  • 2,064
  • 2
  • 17
  • 36
1
vote
3 answers

How do you find the fully qualified path name of a file?

On Windows, you can go to "Run," type in "cmd," press enter, and start up "C:\Windows\system32\cmd.exe" rather easily. The same is true for "python" or "pythonw" (though nothing pops up in the second example). If all you know is that you want to…
Noctis Skytower
  • 21,433
  • 16
  • 79
  • 117