Return-Path: Delivered-To: apmail-incubator-stdcxx-user-archive@www.apache.org Received: (qmail 15663 invoked from network); 14 Feb 2006 20:01:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Feb 2006 20:01:27 -0000 Received: (qmail 77802 invoked by uid 500); 14 Feb 2006 20:01:27 -0000 Delivered-To: apmail-incubator-stdcxx-user-archive@incubator.apache.org Received: (qmail 77783 invoked by uid 500); 14 Feb 2006 20:01:26 -0000 Mailing-List: contact stdcxx-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-user@incubator.apache.org Delivered-To: mailing list stdcxx-user@incubator.apache.org Received: (qmail 77772 invoked by uid 99); 14 Feb 2006 20:01:26 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Feb 2006 12:01:26 -0800 X-ASF-Spam-Status: No, hits=1.9 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [209.191.86.99] (HELO web82204.mail.mud.yahoo.com) (209.191.86.99) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 14 Feb 2006 12:01:25 -0800 Received: (qmail 2258 invoked by uid 60001); 14 Feb 2006 19:59:04 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=sbcglobal.net; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=cm2k0h/kkrhkIB0MppNChtcDs3bXnt+7PkBLmYdjNpFuzVsTajBGjrb1cs3QfaOLexVlP7kllu2xP+8gKimwxWFYBzMIwG5LezaHd7SGdVlmstfeAjasTopbpBNxGxwQ1tedfnPh5U5vEgHW8cS07CxEnxbG3T7wK+t310wL5EQ= ; Message-ID: <20060214195904.2256.qmail@web82204.mail.mud.yahoo.com> Received: from [208.8.57.2] by web82204.mail.mud.yahoo.com via HTTP; Tue, 14 Feb 2006 11:59:04 PST Date: Tue, 14 Feb 2006 11:59:04 -0800 (PST) From: Dipak Bapatla Subject: Re: Errors compiling examples - Sun studio 11 To: stdcxx-user@incubator.apache.org In-Reply-To: <43F21420.9050505@roguewave.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-211328267-1139947144=:2016" Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --0-211328267-1139947144=:2016 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit I have changed the code as follows in the two definitions in _tree.h to get the examples to compile. const_iterator _C_make_iter (const _C_link_t __node) const { return const_iterator (*this, _C_tree_citer (__node)); } to const_iterator _C_make_iter (_C_link_t __node) const { return const_iterator (*this, _C_tree_citer (__node)); } Removed the const from the parameter type. It is weird that the compiler complained about the code because I have the test program below and it works fine as expected. #include class Hello { public: int num(int a) { return 1; }; int num(const int a) const { return 3; } }; int main(int argc, char** argv) { Hello a; const Hello b = a; int k=3; std::cout << a.num(k) << std::endl; std::cout << b.num(k) << std::endl; } macms01$ ./testit 1 3 Martin Sebor wrote: Dipak Bapatla wrote: > CC: Sun C++ 5.8 Patch 121017-01 2005/12/11 So it looks like we have the vanilla 5.8 and you are have a patched version of the same. I don't think I can get this version installed here anytime soon to reduce the error to a small enough test case to put together and test a workaround for you but I can suggest one. Rename the const overload of _C_make_iter to _C_make_const_iter (or something similarly unique), and replace all calls to it (i.e., all calls from other __rw_tree const member functions) with those to the renamed function. Martin > > Martin Sebor wrote: Dipak Bapatla wrote: > >>Hi, >> >>The same error shows up with around three or four examples. > > > The error is obviously bogus. It says there is an ambiguity between > > __rb_tree::_C_make_iter (__rw_rb_tree_node*) > > and > > __rb_tree::_C_make_iter (const __rw_rb_tree_node*) const > > There is no ambiguity between the two and I'm not seeing any errors > in my build. What exactly is the CC version you are using? Mine is > > $ CC -V > CC: Sun C++ 5.8 2005/10/13 > > Martin > > > --0-211328267-1139947144=:2016--