You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Martin Sebor (JIRA)" <ji...@apache.org> on 2006/05/22 19:49:33 UTC

[jira] Updated: (STDCXX-178) [Sun C++ 5.8 patch 121017-01] bogus ambiguity on a const member overload

     [ 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 <class T>
> struct A {
>     typedef T* P;
>     template <class U> struct AA { typedef A<U> AU; };
> };
> template <class T>
> struct B {
>     typedef typename T::template AA <B>::AU TB;
>     typedef typename TB::P                  BP;
>     BP bp [1];
> };
> template <class T, class V>
> struct C {
>     typedef typename B<V>::BP B;
>     void foobar (B) { }
>     void foobar (const B) const { }
>     B bp;
>     C () { foobar (bp->bp [0]); }
> } ;
> int main ()
> {
>     C <char, A<int> > 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<char, A<int>>::foobar(B<A<int>>*)" and "C<char, A<int>>::foobar(B<A<int>>*const) const".
> "t.C", line 29:     Where: While instantiating "C<char, A<int>>::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