This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/7678: implicity typename deprecated inheritance problem
- From: dl256 at columbia dot edu
- To: gcc-gnats at gcc dot gnu dot org
- Date: 21 Aug 2002 17:00:59 -0000
- Subject: c++/7678: implicity typename deprecated inheritance problem
- Reply-to: dl256 at columbia dot edu
>Number: 7678
>Category: c++
>Synopsis: implicity typename deprecated inheritance problem
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Aug 21 10:06:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: dl256@columbia.edu
>Release: gcc-3.1
>Organization:
>Environment:
gnu-linux kernal 2.4.18 (i686)
>Description:
compile the attached file using:
g++ -c experiment.cpp
The compiler warns that "implicit typname is deprecated".
. The base class is templated. It takes a traits structure as it's tmeplate argument, and then it creates typedefs in the public area of the class. The derived class is also templated, but it contains no typedefs. It is desirable to used the types defined in the base class in the derived class, without using the typename base<__traits>:: qualification.
Is your interpretation of the specification correct for this case? This doesn't make sense to me. The new types should at lease be inherited in the derived class so that we can use them in the usual way (i.e., without full qualification using typename).
>How-To-Repeat:
Just compile the attached file and check the warnings.
>Fix:
Don't know.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="experiment.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="experiment.cpp"
Ly8gQSB0ZXN0IGMrKyBjb2RlIHRvIGV4aGliaXQgYW4gdW5kZXNpcmVkIGZlYXR1cmUgb2YgaW4g
Z2NjLTMuMQovLwovLyBUaGUgd2FybmluZyBpc3N1ZWQgYnkgdGhlIGNvbXBpbGVyIGhhcyB0byBk
byB3aXRoCi8vICJpbXBsaWNpdCB0eXBlbmFtZSBkZXByZWNhdGVkIi4gIFdlIHdvdWxkIGxpa2Ug
dG8gdXNlIHNpemVfdHlwZQovLyBhbmQgdmFsdWVfdHlwZSBpbiB0aG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