From 9102530679531978946
X-Google-Thread: f78e5,cc5f8341523fbc66
X-Google-NewGroupId: yes
X-Google-Attributes: gid7894ca11fe,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news1.google.com!news2.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Sat, 28 Aug 2010 22:40:01 -0500
Return-Path: <cppmods@ruralroute.cs.rpi.edu>
To: (Usenet)
From: "Johannes Schaub (litb)" <schaub-johannes@web.de>
Newsgroups: comp.std.c++
Subject: Re: FCD issue: Contradiction about dependency of "operator T()"
Followup-To: comp.std.c++
Organization: T-Online
Sender: cppmods@cs.rpi.edu
Approved: james.dennett@gmail.com
Message-ID: <i59jsm$87s$03$1@news.t-online.com>
References: <i58efj$eav$02$1@news.t-online.com>
 <5176b18a-9065-4dd2-83c5-896f78f19dbd@x42g2000yqx.googlegroups.com>
Content-Type: text/plain; charset="ISO-8859-1"
X-Original-Date: Sat, 28 Aug 2010 02:07:51 +0200
X-Submission-Address: std-c++@netlab.cs.rpi.edu
Date: Sat, 28 Aug 2010 22:30:25 CST
Lines: 72
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-p5duYMxH9MKMzPEne1yrqCyUPEKeZD0V5B7uFoihzJ8GqQX9enISrSQFA4lxHqaQneK0GcoHOQtawnX!wm5Z/NSrTjtp7CdEY8M0fplmo5H+FzHDwCnXV/ABpxUsQ+j6jp5IpmqKTcvs
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
Xref: g2news1.google.com comp.std.c++:2923

David Krauss wrote:

> On Aug 27, 2:28 pm, "Johannes Schaub (litb)" <schaub-johan...@web.de>
> wrote:
>> The FCD changed the text of 14.7.2/1 about the Status of dependency of a
>
> Replace all 14.7.x with 14.6.x.
>

I'm sorry, I was using the document that hilights the changes (3090) instead
of the FCD itself (3092). Next time I take care :)

>> function call to read like
>>
>> "In an expression of the form:
>>
>> postfix-expression ( expression-list[opt] )
>>
>> where the postfix-expression is an unqualified-id , the unqualified-id
>> denotes a dependent name if and only if any of the expressions in the
>> expression-list is a type-dependent expression (14.7.2.2)."
>>
>> This rule contradicts 14.7.2.2/3 which says
>>
>> "An id-expression is type-dependent if it contains:
>>  - a conversion-function-id that specifies a dependent type,"
>
> Why are conversion functions particularly significant? I think the
> idea here is that such a function may be named by a typedef or
> dependent typename.
>

Yes, a conversion function can be named by a typedef. Two conversion
function names are equal if the type specified in them is the same (clause 3
- no lexical comparison, but semantical comparison is done).


> The first thing in that list is
>
> - an identifier associated by name lookup with one or more
> declarations declared with a dependent type
>

I skipped that, because the issue was with the thing i mentioned :) I
probably should have indicated that somehow.

> So if an argument is declared with dependent type, the function
> identifier is associated with a dependent type by name lookup, hence
> dependent.
>

But if I call "operator T()" there is no argument because the expression-
list is absent. So we don't have an expression that is type-dependent, and
this makes the name "operator T" non-dependent ("if and only if"). But
14.6.2.2/3 does make it dependent. This looks constradictory to me. Note
that C++03 did not say "unqualified-id" but just "identifier" here, which
did not include conversion function id's and thus is not affected by this
issue.

In any case, it should not make a difference for calls of kind "operator
T()", because a dependent function call can never end up calling a member
function of a dependent base class (DR #213). But there still is a
contradiction, at least the way I interpret that wording. So, is a ".
template" required in "operator T().foo<..>()" ? Yes, because it is
dependent, or no because it is not?

--
[ 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                      ]



