www.digitalmars.com         C & C++   DMDScript  

c++ - [bug] Failure to prefer more-specific (non-template) function

reply "Matthew" <matthew hat.stlsoft.dot.org> writes:
The most specific (non-template) form of get_int() (defined on line 122)
should be matched when instantiating f() for line 168.

Cheers

Matthew


begin 666 test.dm.zip
M4$L#!!0````(`%./A34 -%H=P (``",+```+````=&5S="YD;2YC<'"]EMUO
MFS 0P-\C\3^<5"F"*"H%WI(T#\O:[6$?U4*E2M.$'&(62V 0F*I5E/^]MK$A
M%-)D739+$8[MN_O=AP^, 3T"^RP#1K8Q,(2^I?]EF48,/F.TQCG<DA 7<M>V
M+P -XW*-85:PN."';/6\W,R%],4:1X1BJ>+[K1\L[^_N?MPLE\']M_OES4?S
MR0(Y3/,Q)6OKR5(FC^.=,K0+/9 )9LA^Q 5-+S=9)EDI2G"1H1"#.F0,MF)=
M\!4L+T,&7"! SQFN%K?50XQP W) ^4_/_36M5G?35[(T?5O4:4M6<X:3+$:,
M Z_2-(8/\Y;*1Q27.&!I(!WI5X]IF<"V. K7X.R!20-<AN>H]DRO=;QH2(XR
MS*[FQS"N#F H#5V$'2\)Z,G0?ZT74 0%1Y"()Y6-#MI,N2C. N\T?HLQ;FVZ
M[<UVL/<!_C;$>NV-3#=4AS%F_KC>/G/9'<[YV3+.![<X D6,B )DLR*,I+00
MJ[(8E,L//*L552B/+E02)Y"5JYB$\H QJ/Y,JKTTPSEB:0Z$,M."D*MEG4#E
MF)4YA2OMN8X2EX'?^$_D6GAN%^>]&HU!7T5X/.>$QJ*Y*\4!?P8/IN]5^F'(
MO#$\Z#^6!-JSP[Q+2<-M[ X9<7N-F+ZKM89.1V]#$CICX >T 1Y%BT:1VU$4
MNFW 'GDQ)QU!HB7.7J:?XG2%XJ8X:RCQ]H1'G)/H.: IE0$080PVB-_5#4F"
MJ*2AJ&S!/-9W:3+1%U X<3 -\_?8\75H]ZRIWM-$3 30'&41M?3YH?PBN.:_
MH8IRW3 .?40(<1WRDQR(&CC6L.B>5(O5V*_['8>:3R:Z;ZD77XUY6GAX$I2 
M:5FUK"PHY;\N,F8=C0"Q_EG)?46$UO4F\!*^8#916SC\$\91/8/?)WYMIGN^
M>.)-5/-'9G4?U=QMYL1KO-QK1.?U27KQ`E!+`0(4`!0````(`%./A34 -%H=
MP (``",+```+``````````$`( "V 0````!T97-T+F1M+F-P<%!+!08`````
.`0`!`#D```#I` ``````
`
end
Dec 04 2006
parent "Matthew" <matthew hat.stlsoft.dot.org> writes:
"Matthew" <matthew hat.stlsoft.dot.org> wrote in message
news:el35g3$1eb$1 digitaldaemon.com...
 The most specific (non-template) form of get_int() (defined on line 122)
 should be matched when instantiating f() for line 168.
FYI: There's a workaround: #if defined(__DMC__) inline int get_int(int const &i) { return i; } #else /* ? compiler */ inline int get_int(int i) { return i; } #endif /* compiler */ But this is not good enough for the actual code I'm using this technique for.
Dec 04 2006