f



Qualified-id and qualified names?

Hello all - i found there are many places where the Standard refers to
qualified-id, but actually in that context no qualified-id appears or the
obvious intend was to apply to all qualified names. Examples:

3.4.3.1/1: "If the nested-name-specifier of a qualified-id nominates a
class, the name specified after the nested-name-specifier is looked up in
the scope of the class (10.2), except for the cases listed below: [...]  the
lookup for a name specified in a using-declaration (7.3.3) also finds class
or enumeration names" - no qualified-id appears in a using declaration.

3.4.3.2/1: If the nested-name-specifier of a qualified-id nominates a
namespace, the name specified after the nested-name-specifier is looked up
in the scope of the namespace ..." - what about declaration "A::f<int>
foo;", where the type-specifier does not use qualified-id?

14.7/6: "If the qualified-id in a typename-specifier does not denote a type,
the program is ill-formed." - no qualified-id here either!

14.7.2.1/4: "A name is a member of the current instantiation if it is ... —
A qualified-id in which the nested-name-specifier refers to the current
instantiation." - what about type-specifiers like "T::x y;" ?

I've noticed DR 120 ( http://www.open-
std.org/jtc1/sc22/wg21/docs/cwg_defects.html#120 ) replaced "qualified-name"
by "qualified-id" in some places - could it be that the original intent of
"qualified-name" was to apply to all names that happen to use nested-name-
specifiers?

Thanks!

-- 
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]

0
Johannes
1/3/2010 12:08:20 PM
comp.std.c++ 2720 articles. 1 followers. Post Follow

0 Replies
218 Views

Similar Articles

[PageSpeed] 53

Reply:

Similar Artilces:

[C++0x] Qualifiers, more qualifiers, aspects and annotations, oh my!
Greetings, reading recent papers for the core language, such as n1706, n1703 and n1696, a thought occurred to me: all introduce declarative meta information about the relevant entities. In the Java camp, the syntactic concept of "annotations" has been introduced which seems to subsume all of the above nicely, and I was wondering if it could be borrowed somehow to provide an unified syntactic approach which frees C++ from the "cannot define appropriate keyword" syndrome, but also from a deluge of keywords and qualifiers (which to some extent already occurs in Java). The following are just stabs at a proposed variant syntax for a number of concepts picked from recent papers in no particular order; note that often I only show the *declaration* of annotations because I have no idea of what the definition should be :-). Although I cannot tell what exactly an annotation in C++ is supposed to be, it seems to me that annotations: - should be namespaced, with standard annotations defined in std:: and possibly compiler specific annotations (see [1] below); - could be intrinsic, meaning known and acted upon by the compiler, but if not intrinsic a definition must be available; - could result from template instantiation, i.e. I can introduce template annotations with type and non-type parameters; - should be found using lookup rules as similar as possible to the lookup rules applicable to the entities they annotate, because C++ ...

core issue 147 and mem-initializer-id, qualified-id, injected-class-name's
Hi, 3.4.3.1 had been changed a lot since 1998, to deal with repetitions of class names like struct B { B(); } B::B() { ; } B::B b; The problem with the second form is that the class-name B is injected in its own scope. So, B::B looked up B in its own scope and indeed found a class B. This was fixed by making the injected name B formally an injected-class-name, and modifying 3.4.3.1 so that B::B names the ctor. N1655 modifies it again, to restrict it to places where "the constructor is an acceptable lookup result". Now, one of the advantages of the pre-N1655 form was that it also outlawed funny stuff like struct D_notok { D_notok() : B::B::B() { } }; while it probably does allow struct D_ok { int B; D_ok() : B(1), B::B() { } }; The reason is that I think that B::B( ) is a member-initializer-id which isn't a qualified-id, but in B::B::B( ) the nested-name-specifier is B::B:: and that is a qualified-id. It's illegal, of course because it names the constructor in a nested-name-specifier. Now, with N1655 the wording in 3.4.3.1 no longer applies to such cases and B::B::B( ) is again legal. B::B:: is just a nested name specifier, where the second B is the injected-class-name. Do I read it correctly? Is it intended? Regards, Michiel Salters --- [ comp.std.c++ is moderated. To submit articles, try just posting with ] [ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ] [ ...

Qualified Names
This is a multi-part message in MIME format. ------=_NextPart_000_0019_01C36293.5E4C0220 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable I have the following SQL statement =20 SELECT * FROM system_user JOIN other_user ON System_user.userid =3D other_user.userid =20 =20 I get back cols along with both the "userid" cols in both the tables. These cols are however not fully qualified.=20 =20 Is there anywhere to configure postgres to always return a col in the format "tablename.columnname...

Question Can I use explicit qualifier <C> after member function name of a template class?
Bjarne Stroustrup's "The C++ Language Programming" says at P330: "Within the scope of String<C>, qualification with <C> is redundant for the name of the template itself, so String<C>::String is the name for the constructor. If you prefer, you can be explicit: template<class T> String<C>: String<C> () { /*...*/ }" But in fact, I find I cannot use this 'explicit' form for any member function of a template class with g++ or Comeau. Is it the problem of the compilers or the book? an0 wrote: > Bjarne Stroustrup's "T...

typedefs, qualified identifiers, class names and name lookup
Hello, There are three similar programs below. All of these use typedef names, qualified identifiers, class names and name lookup mechanism in various contexts. I found that most respect C++ compilers differ significantly in interpreting the code. So, could anyone pick a correct behavior a conformant compiler should follow for each of the cases? Please note that I used the following compilers and command-line options: EDG 3.6 --strict MSVC 13.10.3077 /Za GCC 3.4.4 --ansi Thank you. // 1 class C { public: int f(); }; int main() { typedef C T; C c; // ...

Not-quite-the-module-name qualified names in extension modules? What?
Hi. I built the [xxmodule.c] from the source distribution, as suggested by the Python 3.1.1 docs. I named this [xx.pyd], as I believed the module name was just "xx". Indeed importing xx works fine, but when I do help(xx) I get ... <example> >>> help( xx ) Help on module xx: NAME xx - This is a template module just for instruction. FILE c:\projects\progrock\lib\progrock\cppy_dev\examples\02_xx_apilevel\xx.pyd CLASSES builtins.Exception(builtins.BaseException) error buil...

qualified name VS unqualified name in class template.
Hey, guys. There is a problem. e.g. template <typename T> class foo { public: foo(); ~foo(); private: static size_t bar; }; template <typename T> size_t foo<T>::bar = 0; template <typename T> foo<T>::foo() { ++bar; // (1) } template <typename T> foo<T>::~foo() { --bar; // (2) } Note the place (1), (2), it can be replaced with ++foo<T>::bar; --foo<T>::bar; The qualified name and unqualified name are all OK, and most c++ book use the qualified name preferable. ...

qualified name VS unqualified name in class template.
In the book "C++ Template The Complete Guide". There is an example in section 16.3 "The Curiously Recurring Template Pattern" that contributes an object counter. I have some doubt is the code. The complete code is below: // inherit/objectcounter.hpp template <typename CountedType> class ObjectCounter { private: static size_t count; // number of existing objects protected: // default constructor ObjectCounter() { ++ObjectCounter<CountedType>::count; // (1) } // copy constructor ObjectCounter (ObjectCounte...

typedefs, qualified identifiers, class names and name lookup
Hello, There is three similar programs below. All of these use typedef names, qualified identifiers, class names and name lookup mechanism in various contexts. I found that most respect C++ compilers differ significantly in interpreting the code. So, could anyone pick a correct behavior a conformant compiler should follow for each of the cases? Please note that I used the following compilers and command-line options: EDG 3.6 --strict MSVC 13.10.3077 /Za GCC 3.4.4 --ansi Thank you. // 1 class C { public: int f(); }; int main() { typedef C T; C c; // EDG MSVC GCC c.~T(); // ok ok ok c.T::~T(); // ok ok ok c.T::C::f(); // ok fails ok c.T::T::f(); // fails fails fails } // 2 class C { public: typedef int T; int f(); }; int main() { typedef C T; C c; // EDG MSVC GCC c.~T(); // ok ok fails c.T::~T(); // ok fails fails c.T::C::f(); // ok fails fails c.T::T::f(); // fails fails fails } // 3 class T { public: int f(); }; class C : public T { public: typedef int T; }; int main() { typedef C T; C c; // EDG MSVC GCC c.~T(); // ok ok fails c.T::~T(); //...

Pointer to qualified poitner to qualified object
Deal all, The type typedef double ***tmp_tensor3; is meant to represent a three-dimensional array. For some reasons the standard array-of-array-of-array will not work in my case. Can I convert an object of this type to the following type? typedef doule * const * const * tensor3; This would indicate that I would not like to mess up the indices, just modify the numbers. Suppose I have a variable of type tensor3, and a function is not meant to modify the numbers, so that would expect a const_testor3 object; typedef const doule * const * const * const_tensor3; But that also will not work ...

The database name component of the object qualifier must be the name of the current database
Guys, 1st of all.. sorry about my english ok? Im from Brazil... Im trying to get a RS connecting through 2 databases with the query below: SELECT scar..osbalcao.numeroos, ccell.dbo.atrib_os.os FROM ccell.dbo.atrib_os JOIN scar.dbo.osbalcao on ccell.dbo.atrib_os.os = scar.dbo.osbalcao.numeroos WHERE scar.dbo.osbalcao.localprod = '257' AND scar.dbo.osbalcao.status in ('EM') On a SQL IDE i got a good RS, but, when i try to use that same query on Delphi + ZEOS, the SQL Server tells me that "The database name component of the object qualifier must be the name of the current...

Qualified table names
I have a quick question on how to qualify table names as it relates to "dbo" vs. user names. Suppose that I am a user named "dwuser1", and that I need to create a table named "dw_stage_1". Do I use dbo as in "dbo.dw_stage_1" or do I use "dwuser1.dw_stage_1" for the qualified table name? Are both OK? If so, what would be the implications of each? php newbie (newtophp2000@yahoo.com) writes: > I have a quick question on how to qualify table names as it relates to > "dbo" vs. user names. Suppose that I am a user named "dw...

The man in the flight-suit did not qualify then and he does not qualify now
The man in the flight-suit did not qualify then and he does not qualify now _______________________________________________________________ George W. Bush did not qualify for : [1] Flight training. [2] A direct commission. .................................................................................................................. But he was granted both. And he jumped the waiting lists. _______________________________________________________________ ...

The man in the flight-suit did not qualify then and he does not qualify now . .
The man in the flight-suit did not qualify then and he does not qualify now _______________________________________________________________ George W. Bush did not qualify for : [1] Flight training. [2] A direct commission. .................................................................................................................. But he was granted both. And he jumped the waiting lists. _______________________________________________________________ ...

SFINAE and qualified names (::)
Greetings. The following attempt to overload the constructor does not compile. Comeau online explains that this is because RAI_t::value_type does not exist if RAI_t is "int*". But isn't this covered by "substitution failure is not an error"? The commented construct shows one alternative, but I'm curious. Is there another syntax? Thanks! Sincerely, Mike Albert #include <vector> using namespace std; template<typename RAI_t> struct Y { Y(RAI_t p, RAI_t q){} void Y(vector<typename RAI_t::value_type> const& vec){} //template&...

qualified name is not allowed
using namespace std; typedef struct { tU16 u16AppID; tU16 u16RegisterID; tU16 u16CmdCounter; tU16 u16FunctionID; tU16 u16SourceSubID; tU32 u32InternalData; } trMessageDataForMethodResult; class ExecuteTest { auto_ptr< trMessageDataForMethodResult > _MessageDataForMethodResultExecuteTest; }; I am using RVCT compiler( ARM ) I forgot to paste the problem, While executing following code( I have removed code that Im not suppossed to post).I am getting the error as qualified name is not allowed at the line whe...

workaround to C "typedef struct name *name;" C vs C++
Hi All, This is valid code in C because "struct name" and "name" are distinct { the poster refers to this part of the subj line: typedef struct name *name; -mod } types, but not in C++ where this produces a compiler error. I have a third party C library that uses this extensively in header files and I need to use this in C++ code. Is there a way around this? Thanks, Brian -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] Am 25.08.2011 14:30, schrieb Brian L: > Hi All, > > This is valid code in C because "struct name" and "name" are distinct > > { the poster refers to this part of the subj line: > > typedef struct name *name; > > -mod } > > types, but not in C++ where this produces a compiler error. I have a > third party C library that uses this extensively in header files and I > need to use this in C++ code. > > Is there a way around this? What do you mean with a way around? You did not really explain what the actual reason for this construction is. What do you want to realize? The C++ standard is clear that this typedef declaration is invalid in a non-class scope, because the second 'name' does refer to something different than the second one. I can define a construction that works, but I don't know whether this will help ...

Fully qualified domain name
Hi, This bit of context may be irrellevent? I'm trying to use Mandrake 9.1 with Postfix, Fetchmail, Spamassassin...etc to collect my mail from my ISP. I am unclear how 'fully qualified domain' (FQD) names work in my context. I have a Linux box networked using Samba via a wire/wireless router (also ADSL), which acts as a DHCP server. Each of the machines on my network has a name (pink, black, red, ...). What does the FQD do? How does it relate to my ISP's FQD, if at all? Do I need to be running a server to convert it to an IP? Does it allow me to use web browser addresses dif...

name qualifier bypasses masquerade?
I recently had the misfortune of restarting my mail system configuration (after having it right for a fair number of years), and don't seem to have correctly resurrected my masquerading configuration. The machine in question hosts a moderate number of virtual domains, which occasionally generate mail from a variety of sources. I thought it was right up until earlier this evening, when I sent some mail to a mailing list using the unqualified name. What showed up in the mail was qualified with $j, but *not* masqueraded to watt.com. I'm confused. I sent the mail from my machine, where $j is "wattres.watt.com" with the command: % mail listname Subject: blah... [ etc ] ^D % And what went out in the mailing list headers looked like: [ ... received: lines ] From: steve@Watt.COM (Steve Watt) To: listname@wattres.watt.com [ ... lots of list headers ] The From: is correctly masqueraded, but the To: wasn't. My .mc isn't too ugly, I think...: - - - 8< - - - OSTYPE(freebsd5) DOMAIN(generic) MASQUERADE_AS(Watt.COM)dnl MASQUERADE_EXCEPTION(`therallyeclub.org') FEATURE(masquerade_envelope)dnl FEATURE(delay_checks) FEATURE(access_db, `hash -o -T<TMPF> /etc/mail/access') FEATURE(blacklist_recipients) FEATURE(local_lmtp) FEATURE(mailertable, `hash -o /etc/mail/mailertable') FEATURE(virtusertable, `hash -o /etc/mail/virtusertable') define(`ALIAS_FILE', ``/etc/mail/aliases, /etc/mail/listdefs, /etc/mail/mailman-lists'') ...

What is a qualified name (Namespaces in XML) ?
Dear group readers, Both "Namespaces in XML" recommendations (1.0 and 1.1) define a qualified name with the following sentence : "A qualified name is a name subject to namespace interpretation." This is rather vague. To clarify things, I went checking the BNF grammar of productions 7, 8 and 9, and saw : [7] QName ::= PrefixedName | UnprefixedName [8] PrefixedName ::= Prefix ':' LocalPart [9] UnprefixedName ::= LocalPart So at the syntactic level, a qualified name is prefixed or is not prefixed. My question is : is a qualified name _always_ in a NS (prefixed means there is an explicit NS binding and unprefixed means there is a default NS declaration) or is a qualified name sometimes not in any NS i.e. there is no default NS declaration and the name has no prefix ? I ask this because I thought that a qualified name could be a name outside any NS. And then I read in "Definitive XML Schema" 2nd edition by Priscilla Walmsley that "Unqualified names, on the other hand, are names that are not in any namespace" (page 40). Things are clear from her point of view but I found it not so clear in the recommendation, that's why I am asking this here. Of course, I then told myself that using the term "qualified" would be weird if the name was not in any NS. So the next question is : is there a place in the recommendation where this is answered clearly ? TIA Ludovic Kuty ...

qualified member name lookup
Hello, If I compile the following program with gcc, clang or comeau I get a error about ambiguity. Is this correct behavior? struct a { int foo; }; struct a2 : virtual a {}; struct b : a2 {}; struct c : a2 {}; struct d : b, c { void f() { b::a2::foo; // OK for MSVC, ERROR for others } }; (clang) error: ambiguous conversion from derived class 'd' to base class 'a2': struct d -> struct b -> struct a2 struct d -> struct c -> struct a2 (gcc) error: 'a2' is an ambiguous base of 'd' (...

adding a qualified domain name
I am super new to sendmail, so please bear with me. We have a sendmail smtp relay server set up within our internal network. I would like to be able to add our domain (ie ourdomain.com) to any email message that gets sent to this relay without one (people tend to forget to add it from thier mail client). Honestly, I looked at always_add_domain, played with #Dj$w.Foo.COM and looked at some masqueading FEATURES, but nothing seems to work, or the answer is so convoulted that I go off on a tangent. Just wondering if anyone did this, and if it easily explained Thanks cgmckeever ...

Nslookup and fully qualified name
Having a problem with nslookup and dig for a host that is completely all numbers. for example, if you do nslookup or dig on 437542 it returns no answer or nxdomain. However if you do 437542.domain.com with nslookup or dig, it returns an answer. You might say that my resolv list is not right, but if you do a www for domain.com and my resolv list appends domain.com www works. What is going on with this? thanks, --------------------------------- Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes Try my netdig client at www.mvptools.com. Has an interactive mode like nslookup, and should work with your non-ip numbers. Requires .net framework 1.1 however, so won't work on unix. -- William Stacey "M Alan C" <my00sc00by@yahoo.com> wrote in message news:buk2sr$1hic$1@sf1.isc.org... > Having a problem with nslookup and dig for a host that is completely all numbers. > > for example, if you do nslookup or dig on 437542 it returns no answer or nxdomain. > > However if you do 437542.domain.com with nslookup or dig, it returns an answer. You might say that my resolv list is not right, but if you do a www for domain.com and my resolv list appends domain.com www works. > > What is going on with this? > > thanks, > > --------------------------------- > Do you Yahoo!? > Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes > > ...

invalid qualified SQL name
I'm trying to configure multimaster replication. Here is what I do: SQL> BEGIN 2 DBMS_REPCAT.ADD_MASTER_DATABASE ( 3 gname => 'hand', 4 master => 'orcl_sms-222', 5 use_existing_objects => TRUE, 6 copy_rows => FALSE, 7 propagation_mode => 'ASYNCHRONOUS'); 8 END; 9 / This is the error I get: * ERROR at line 1: ORA-44004: invalid qualified SQL name ORA-06512: at "SYS.DBMS_REPCAT_UTL", line 4271 ORA-06512: at "SYS.DBMS_REPCAT_MAS", line 2156 ORA-06512: at "SYS.DBMS_RE...

Web resources about - Qualified-id and qualified names? - comp.std.c++

Resources last updated: 3/6/2016 3:29:40 PM