[ http://issues.apache.org/jira/browse/STDCXX-178?page=all ] Martin Sebor updated STDCXX-178: -------------------------------- Summary: [Sun C++ 5.8 patch 121017-01] bogus ambiguity on a const member overload (was: Sun C++ 5.8 patch 121017-01 bogus ambiguity on a const member overload) Version: 4.1.3 > [Sun C++ 5.8 patch 121017-01] bogus ambiguity on a const member overload > ------------------------------------------------------------------------ > > Key: STDCXX-178 > URL: http://issues.apache.org/jira/browse/STDCXX-178 > Project: C++ Standard Library > Type: Bug > Components: External > Versions: 4.1.3 > Environment: Sun C++ 5.8 Patch 121017-01 2005/12/11 > Reporter: Martin Sebor > Priority: Minor > > Test case for a problem apparently newly introduced in this patch. The vanilla 5.8 has no problems with the code. This bug is the cause of the compilation errors discussed in the following thread: > http://mail-archives.apache.org/mod_mbox/incubator-stdcxx-user/200602.mbox/%3c20060214162358.34245.qmail@web82210.mail.mud.yahoo.com%3e > $ cat t.C && CC -V t.C > template > struct A { > typedef T* P; > template struct AA { typedef A AU; }; > }; > template > struct B { > typedef typename T::template AA ::AU TB; > typedef typename TB::P BP; > BP bp [1]; > }; > template > struct C { > typedef typename B::BP B; > void foobar (B) { } > void foobar (const B) const { } > B bp; > C () { foobar (bp->bp [0]); } > } ; > int main () > { > C > c; > } > CC: Sun C++ 5.8 Patch 121017-01 2005/12/11 > ccfe: Sun C++ 5.8 Patch 121017-01 2005/12/11 > "t.C", line 24: Error: Overloading ambiguity between "C>::foobar(B>*)" and "C>::foobar(B>*const) const". > "t.C", line 29: Where: While instantiating "C>::C()". > "t.C", line 29: Where: Instantiated from non-template code. > 1 Error(s) detected. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira