Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Codewarrior Windows > Re: void* conve...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 5 Topic 254 of 319
Post > Topic >>

Re: void* conversion yields ambiguity upon dereference

by MW Ron <mwron@[EMAIL PROTECTED] > Feb 22, 2005 at 11:30 PM

In article <37a2msF5a16enU1@[EMAIL PROTECTED]
>,
 "Jonathan Turkanis" <technews@[EMAIL PROTECTED]
> wrote:

>Hi,
>
>Consider this program:
>
>    struct Thing {
>        operator void* () const;
>    };
>
>    struct any {
>        template<class T>
>        any(T const&);
>    };
>
>    char operator*(any const&);
>
>    int main()
>    {
>        Thing t;
>        *t;
>    }
>
>This compiles on VC7.1, GCC 3.4 and como 4.3.3.  I'm interested to know
the
>result when compiled on CW 9.4, which I don;t have access to. Based on
the 
>Boost
>regression re****ts here, http://tinyurl.com/5wtud,
I am guessing the
compiler
>will complain of an ambiguity between 'void operator*(any const&)' and
>'operator* (void *)'.
>
>I'm puzzled by this reference to 'operator* (void*)'. Since a void
pointer
>cannot be dereferenced, why should this dereferncing operation be
considered
>during overload resolution?

I thought I replied to this.

This is an error and is corrected in a newer version of CodeWarrior.

Ron

-- 
Metrowerks Community Forum is a free online resource for developers 
to discuss CodeWarrior topics with other users and Metrowerks' staff
        --   http://www.metrowerks.com/community
 --

 Ron Liechty - MWRon@[EMAIL PROTECTED]
 - http://www.metrowerks.com
 




 5 Posts in Topic:
void* conversion yields ambiguity upon dereference
"Jonathan Turkanis&q  2005-02-13 15:24:26 
Re: void* conversion yields ambiguity upon dereference
MW Ron <mwron@[EMAIL P  2005-02-22 23:30:17 
Re: void* conversion yields ambiguity upon dereference
"Jonathan Turkanis&q  2005-02-22 21:58:25 
Re: void* conversion yields ambiguity upon dereference
MW Ron <mwron@[EMAIL P  2005-02-23 22:42:23 
Re: void* conversion yields ambiguity upon dereference
"Jonathan Turkanis&q  2005-02-23 21:59:25 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 2:58:00 CDT 2008.