[PATCH] c++0x variadic min, max and minmax.

Chris Fairles chris.fairles@gmail.com
Wed Jul 9 12:54:00 GMT 2008


On Wed, Jul 9, 2008 at 7:39 AM, Paolo Carlini <paolo.carlini@oracle.com> wrote:
> Hi Chris,
>
> first thanks a lot! Unfortunately, before going ahead with this one I have to check something: I clearly remember rumors in Sophia-Antipolis about using initializer_list instead (or additionally) to variadic args for those new facilities... Before committing something which would be at risk of being reverted or profoundly changed soon, let me check...
>
> Thanks for the patience,
> Paolo.
>
>

Thanks, I was actually wondering myself why they didn't go for that
solution. In any case, there's more work to be done on this patch but
I'll hold off submitting until its clear that the variadic version
will be staying around.

If it does stay, I assume I also have to add the fwd decl's to
stl_algofwd? And by doing so, the enable_if's need the variadic
versions of is_same. Could we make a variadic __is_same extension in
ext/type_traits.h perhaps so that its available to both algofwd and
algobase?

Another is_same question. Do you think is_same is transitive? That is,
if is_same<T,U>::value == true && is_same<U,V>::value == true then
is_same<T,V> is guaranteed to be true? I make this assumption in the
variadic version to avoid an extra check but it might be invalid.

Chris



More information about the Gcc-patches mailing list