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
4
votes
1 answer

Which functions in standard C++ library should not be prefixed with std:: when used?

When I program in C++, instead of writing using namespace std;, I generally tend to use std:: prefixed components like std::cout, std::cin etc. But then I came across ADL and why you should use using std::swap;. Many components of the standard…
4
votes
1 answer

Overload resolution of a qualified name

Consider this function call: foo::bar(); 11.3.1.1.1, paragraph 3 [over.call.func] (N4778) covers this case: In unqualified function calls, the name is not qualified by an -> or . operator and has the more general form of a primary-expression. The…
4
votes
2 answers

Qualified import in Python

I am looking for a way to import certain methods from a module in a qualified manner; for instance (pseudo-code), from math import sqrt as math.sqrt # ... SQRT2 = math.sqrt(2) Is this possible? This is useful for managing namespaces, in order not…
AlQuemist
  • 1,110
  • 3
  • 12
  • 22
4
votes
3 answers

I don't understand 3.4/2 in the Standard

I don't understand 3.4/2 in the Standard: A name “looked up in the context of an expression” is looked up as an unqualified name in the scope where the expression is found. What if the name is qualified, as N::i below? #include…
Mao
  • 1,065
  • 8
  • 12
4
votes
2 answers

Invalid use of qualified name

I'm trying the following: #include namespace A { extern int j; } int main() { int A::j=5; std::cout << A::j; } But I've error: invalid use of qualified-name ‘A::j’. Please explain why this error occurred?
St.Antario
  • 26,175
  • 41
  • 130
  • 318
3
votes
2 answers

Confusion understanding Virtual function call and dependent base class

I am reading from ebook Templates complete guide and question which i'm gonna ask might be stupid to you but.. There is section in that 9.4.2 Dependent Base Classes which i am unable to understand. Here is the partial text from it:…
Mr.Anubis
  • 5,132
  • 6
  • 29
  • 44
3
votes
1 answer

Why must enum constants be unqualified in switch cases in java?

A bit of context. This is about the Problem with qualified enum names in switch cases like in the example: enum MyEnum { A, B, ; } switch(methodReturnungMyEnum()){ case MyEnum.A: // ... break case MyEnum.B: // ... …
Burdui
  • 1,242
  • 2
  • 10
  • 24
3
votes
2 answers

Can one set default values for Discriminated Union types?

I implemented a Discriminated Union type that would be used to select a function: type BooleanCombinator = | All | Some | None | AtLeast of int | MoreThan of int | NotMoreThan of int | LessThan of int | ExactlyOne …
Soldalma
  • 4,636
  • 3
  • 25
  • 38
3
votes
3 answers

XDocument.Descendants(itemName) - Problems finding qualified name

I'm trying to read a XML-RSS-Feed from a website. Therefore I use a async download and create a XDocument with the XDocument.Parse() Method. The Document intends to be very simple, like this:
dognose
  • 43
  • 1
  • 4
2
votes
1 answer

./ in Clojure (qualified symbol?)

I'm currently implementing a different language (Shen) in Clojure. Shen has a symbol "./" but in Clojure this is interpreted before evaluation and thus results in an error. I do not need "./" inside the macro which is compiling this function to…
2
votes
1 answer

Lookup of dependent qualified names

This program does not compile (error: 'foo' is not a member of 'N'): namespace N { // void foo(); } template void template_func(T t) { N::foo(t); } But if we uncomment the declaration of void foo();, it compiles. Demo. Both…
Dr. Gut
  • 2,053
  • 7
  • 26
2
votes
0 answers

Why is std::begin accessible unqualifiedly when I include vector?

I thought that I always need the std:: qualification for std::something, unless I'm using std::something or the whole namespace std, but it seems that #include makes, for instance, std::begin availble as begin. Why is this the…
Enlico
  • 23,259
  • 6
  • 48
  • 102
2
votes
2 answers

Can I use Sphinx automodule but drop the module name in the signature?

I have a module mod with some submodule submod and use .. automodule:: mod.submod to generate documentation for it. The signatures of the elements (functions, classes etc.) in the modules now show the qualified name, like…
2
votes
3 answers

Use of qualified name in function parameter

According to the C++ Standard, function parameter's name is parsed by a declarator-id, and a declarator-id can also be a qualified name. That means, the following code is perfectly valid (if I've understood the relevant sections from the Standard…
Nawaz
  • 353,942
  • 115
  • 666
  • 851
2
votes
1 answer

Why qualify global elements in instance document?

When validating an xml document using xml-Schema and namespaces, the instance document has to have its global element prefixed with a namespace to qualify it, besides declaring the namespace itself. One would think that a default namespace would…
Oskarols
  • 31
  • 5