From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22159 invoked by alias); 5 Jul 2002 14:06:04 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 22140 invoked by uid 71); 5 Jul 2002 14:06:02 -0000 Resent-Date: 5 Jul 2002 14:06:02 -0000 Resent-Message-ID: <20020705140602.22138.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, dens@stl.sarov.ru Received: (qmail 18074 invoked by uid 61); 5 Jul 2002 13:56:34 -0000 Message-Id: <20020705135634.18071.qmail@sources.redhat.com> Date: Fri, 05 Jul 2002 07:06:00 -0000 From: dens@stl.sarov.ru Reply-To: dens@stl.sarov.ru To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: libstdc++/7216: basic_iostream::traits_type is ambiguous issue X-SW-Source: 2002-07/txt/msg00193.txt.bz2 List-Id: >Number: 7216 >Category: libstdc++ >Synopsis: basic_iostream::traits_type is ambiguous issue >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Fri Jul 05 07:06:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Denis Nagorny >Release: libstdc++3-3.0.1-3 >Organization: >Environment: Linux RedHat 7.2 libstdc++3-3.0.1-3 gcc3-c++-3.0.1-3 >Description: When I try to compile my program: typedef std::char_traits tCT; typedef std::basic_iostream Iostr; int main(int,char*[]) { Iostr::traits_type * some; return 0; } with g++3 & your library compiler produce following message: test.cpp:6: request for member `traits_type' is ambiguous /usr/include/g++-v3/bits/std_ostream.h:54: candidates are: typedef struct std::char_traits std::basic_ostream >::traits_type /usr/include/g++-v3/bits/std_istream.h:54: typedef struct std::char_traits std::basic_istream >::traits_type I know that C++ standard 27.6.1.1 & 27.6.2.1 describes public types of classes basic_istream & basic_ostream such as: ....... public: // Types (inherited from basic_ios (27.4.4)): typedef charT char_type; typedef typename traits::int_type int_type; typedef typename traits::pos_type pos_type; typedef typename traits::off_type off_type; typedef traits traits_type; ............. But I believe that you can place this types in basic_ios only. >How-To-Repeat: Try to compile attached sample >Fix: >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/octet-stream; name="test.cpp" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="test.cpp" I2luY2x1ZGUgPGlvc3RyZWFtPiAKdHlwZWRlZiBzdGQ6OmNoYXJfdHJhaXRzPGNoYXI+IHRDVDsK dHlwZWRlZiBzdGQ6OmJhc2ljX2lvc3RyZWFtPGNoYXIsdENUPiBJb3N0cjsKaW50IG1haW4oaW50 LGNoYXIqW10pCnsKCUlvc3RyOjp0cmFpdHNfdHlwZSAqIHNvbWU7OwoJcmV0dXJuIDA7Cn0KCg==