public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/3979: An update to problem #3971
@ 2001-08-10  7:20 lerdsuwa
  0 siblings, 0 replies; 2+ messages in thread
From: lerdsuwa @ 2001-08-10  7:20 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, kennedy, nobody

Synopsis: An update to problem #3971

State-Changed-From-To: open->closed
State-Changed-By: lerdsuwa
State-Changed-When: Fri Aug 10 07:20:00 2001
State-Changed-Why:
    Not a bug.  The only possible match (using template
    argument deduction rule) is:
      template< class T> 
      inline A<T> operator *(const A<T> &a, const A<T> &b);
    and the conversion from B<T> to A<T> fails.  The function
     template< class T>
     inline B<T> operator *(const B<T> &a, const B<T> &b);
    is not considered (See section 14.8.2.1 para 3 in the
    standard).

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3979&database=gcc


^ permalink raw reply	[flat|nested] 2+ messages in thread

* c++/3979: An update to problem #3971
@ 2001-08-09 14:16 kennedy
  0 siblings, 0 replies; 2+ messages in thread
From: kennedy @ 2001-08-09 14:16 UTC (permalink / raw)
  To: gcc-gnats

>Number:         3979
>Category:       c++
>Synopsis:       An update to problem #3971
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 09 14:16:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Dennis Kennedy
>Release:        g++ 2.95.2
>Organization:
>Environment:
Red Hat 6.2
>Description:
In order to reproduce the error you must comment out the lines:
/ Try commenting out this operator
template< class T>                                   //[1]
inline B<T> operator *(const B<T> &a, const A<T> &b) //[1]
{                                                    //[1]
  return (const A<T> &)a * b;                        //[1]
}

Here is the real error message.
private.cpp: In function `int main()':
private.cpp:59: fields of `const A<int>' are inaccessible in `B<int>' due to private inheritance
                           
>How-To-Repeat:
g++ -o private private.cpp
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/x-unknown-content-type-cppfile; name="private.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="private.cpp"

I2luY2x1ZGUgPG1hdGguaD4NCiNpbmNsdWRlIDxpb3N0cmVhbS5oPg0KDQp0ZW1wbGF0ZTwgY2xh
c3MgVCA+IGNsYXNzIEI7DQoNCnRlbXBsYXRlPCBjbGFzcyBUID4gDQpjbGFzcyBBDQp7DQpwdWJs
aWM6DQogIEEoVCB4PTApIHtkYXRhPXg7fQ0KICBBKGNvbnN0IEE8VD4gJlgpIDogZGF0YShYLmRh
dGEpIHt9DQogIHN0YXRpYyBBPFQ+IG11bHRpcGx5KGNvbnN0IEE8VD4gJmEsIGNvbnN0IEE8VD4g
JmIpOw0KICB2b2lkIHNob3coKSB7IGNvdXQgPDxkYXRhIDw8IlxuIjsgfQ0KcHJpdmF0ZToNCiAg
VCBkYXRhOw0KfTsgIA0KDQp0ZW1wbGF0ZTwgY2xhc3MgVCA+IA0KY2xhc3MgQiA6IHByaXZhdGUg
QTxUPg0Kew0KcHVibGljOg0KICBCKFQgeD0wKSA6IEE8VD4oeCkge30NCiAgQihjb25zdCBBPFQ+
ICZYICkgOiBBPFQ+KFgpIHs7fQ0KICB2b2lkIHNob3coKSB7IEE8VD46OnNob3coKTsgfQ0KfTsN
Cg0KdGVtcGxhdGU8IGNsYXNzIFQ+DQpBPFQ+IEE8VD46Om11bHRpcGx5KGNvbnN0IEE8VD4gJmEs
IGNvbnN0IEE8VD4gJmIpIA0KeyANCiAgcmV0dXJuIEE8VD4oYS5kYXRhICogYi5kYXRhKTsgDQp9
DQoNCnRlbXBsYXRlPCBjbGFzcyBUPiANCmlubGluZSBBPFQ+IG9wZXJhdG9yICooY29uc3QgQTxU
PiAmYSwgY29uc3QgQTxUPiAmYikNCnsNCiAgcmV0dXJuIEE8VD46Om11bHRpcGx5KGEsYik7DQp9
DQoNCnRlbXBsYXRlPCBjbGFzcyBUPg0KaW5saW5lIEI8VD4gb3BlcmF0b3IgKihjb25zdCBCPFQ+
ICZhLCBjb25zdCBCPFQ+ICZiKQ0Kew0KICByZXR1cm4gKGNvbnN0IEE8VD4gJilhICogKGNvbnN0
IEE8VD4gJiliOw0KfQ0KDQojaWYgMA0KLy8gVHJ5IGNvbW1lbnRpbmcgb3V0IHRoaXMgb3BlcmF0
b3INCnRlbXBsYXRlPCBjbGFzcyBUPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
Ly9bMV0NCmlubGluZSBCPFQ+IG9wZXJhdG9yICooY29uc3QgQjxUPiAmYSwgY29uc3QgQTxUPiAm
YikgLy9bMV0NCnsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgLy9bMV0NCiAgcmV0dXJuIChjb25zdCBBPFQ+ICYpYSAqIGI7ICAgICAgICAgICAgICAg
ICAgICAgICAgLy9bMV0NCn0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgLy9bMV0NCiNlbmRpZg0KDQoNCmludCBtYWluKCkNCnsNCiAgQjxpbnQ+IG8y
KDEwMCk7DQogIEE8aW50PiBvMSgyNik7DQogIG8yID0gbzIgKiBvMTsNCiAgbzIuc2hvdygpOw0K
ICByZXR1cm4gMTsNCn0NCg==


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-08-10  7:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-10  7:20 c++/3979: An update to problem #3971 lerdsuwa
  -- strict thread matches above, loose matches on Subject: below --
2001-08-09 14:16 kennedy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).