X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 	tests=AWL,BAYES_40,RCVD_IN_SORBS_WEB
X-Spam-Check-By: sourceware.org
Date: Fri, 30 Jan 2009 14:03:25 +0100 (CET)
From: Marco Atzeri <marco_atzeri@yahoo.it>
Subject: Re: C++ ambiguous template specialization (cygwin only)
To: Dave Korn <dave.korn.cygwin@googlemail.com>, cygwin@cygwin.com
In-Reply-To: <2ca21dcc0901300330h2d95351fyeeaa36a5d86887ad@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Message-ID: <944897.34117.qm@web25005.mail.ukl.yahoo.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Note-from-DJ: This may be spam


--- 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/

