On 2008 May 7, at 4:21, TSa wrote:

BTW, what is a flack?

He's using "flak" (shrapnel; usual usage "catching flak over ...") without understanding it.

Coming back to how C++ handles static overloading. How is
the sort order of (int *), (int &), (int), (const int *),
(const int &), (const int), (int * const) and (const int * const)?
I'm too lazy to look up the details, sorry.

Been a long time, but I thought C++ compilers threw up their arms in despair if multiple conversion paths of the same length existed (that is, it could use (D)(B)A or (D)(C)A). That said, (int &) and (const int) are identical to (int) for dispatch purposes[*] and (int *) is a completely different type which could only be used if something provided a conversion for it, which would be unusual.

[*] The "const" modifier corresponds to "is ro" and the "&" is like aliasing a name with :=, in Perl6 terms; neither is actually part of the type. That said, "const" can be used as a constraint (like a Perl6 "subset" type; not sure about "&". But note that C++ has been updated several times since I last looked, and I may well be misremembering even the old standard.

--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]
system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]
electrical and computer engineering, carnegie mellon university    KF8NH


Reply via email to