This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: C++ ambiguous template specialization (cygwin only)
- From: Marco Atzeri <marco_atzeri at yahoo dot it>
- To: Dave Korn <dave dot korn dot cygwin at googlemail dot com>, cygwin at cygwin dot com
- Date: Fri, 30 Jan 2009 14:03:25 +0100 (CET)
- Subject: Re: C++ ambiguous template specialization (cygwin only)
--- Dave Korn ha scritto:
> Marco Atzeri wrote:
> > Dear all,
> > unfortunately I am not too much familiar with C++,
> > so I have no clue where to look for difference
> > between Cygwin and all the other platforms where
> this
> > problem does not happen.
>
>
> Hmm. The generic template with the <T> is less
> specific and shouldn't
> matter if there's a more-specific one, which there
> is. So, why doesn't the
> (uint64_t, double) version match? Well, looking at
> the other possible
> matches, it seems to think that int64_t is as near a
> match. I wonder if when
> it doesn't have an exact match, it sees
> sign-extension and size-promotion as
> equally different and therefore equally similar and
> therefore ambiguous. You
> could find a C++ expert to explain the resolution
> rules for you, but I think
> that's the sort of basis on which it works.
>
> I wonder what would happen if, on Cygwin, uint64_t
> was a typedef for
> unsigned long long int.
Just tested and the ambiguity go away.
Now I will look for the right way to solve the issue,
instead of changing stdint.h.
> Does it help if you comment
> out the <double, long
> long unsigned int> template on line 198, leaving
> just the <double, uint64_t>
> on line 127 to be a precise match?
>
> cheers,
> DaveK
>
Thanks for the hint
Marco
Passa a Yahoo! Mail.
La webmail che ti offre GRATIS spazio illimitato,
antispam e messenger integrato.
http://it.mail.yahoo.com/??????????????
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/