delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/01/30/08:03:38

X-Recipient: archive-cygwin AT delorie DOT 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 AT yahoo DOT it>
Subject: Re: C++ ambiguous template specialization (cygwin only)
To: Dave Korn <dave DOT korn DOT cygwin AT googlemail DOT com>, cygwin AT cygwin DOT com
In-Reply-To: <2ca21dcc0901300330h2d95351fyeeaa36a5d86887ad@mail.gmail.com>
MIME-Version: 1.0
Message-ID: <944897.34117.qm@web25005.mail.ukl.yahoo.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019