[macstl-dev] Re: Question about sized booleans
glen.low at pixelglow.com
Wed Jul 20 08:44:32 WST 2005
On 20/07/2005, at 2:01 AM, Ilya Lipovsky wrote:
>> So that means that I was using your "select(...)" correctly. Now I
>> will be investigating other venues of resolution. My compiler
>> gives me this:
>> error: cannot convert `stdext::valarray<float>' to `fd_set*' for
>> argument `2' to `int select(int, fd_set*, fd_set*, fd_set*,
>> even though I don't include any system headers.
> Due to shortage of time (can't waste more than 2 hours on the silly
> issue) I propose a workaround: how about if we rename "select" into
> "sel?" Seems work fine for me. Even though "select" sounds more
> understandable, "sel" is shorter to type. Btw, we never invoke
> "exponent" -- only "exp." So it doesn't go against any conventions.
> What's your take on the proposition?
There is a conflict with an implicitly #included system header, but
it should still be OK since the system select function is a C
function with 5 parameters, while macstl's select has only 3
parameters, so C++ overloading should do the right thing. Check that
you're using the right # of parameters and select is on your include
You can also explicitly qualify select if you have problems i.e.
stdext::select (a, b, c). It could be your compiler options are
turning off argument-dependent lookup.
Shortening select to sel is dangerous. In altivec namespace, there's
a sel function that corresponds exactly to vec_sel, and has different
altivec::sel (falsepart, truepart, bool)
A programmer might easily get the two sel's confused, especially when
Cheers, Glen Low
pixelglow software | simply brilliant stuff
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the macstl-dev