Boost logo

Boost :

From: Andrei Alexandrescu (andrewalex_at_[hidden])
Date: 2001-11-20 03:09:40

I think if_true in select_type ought to become a first-class citizen. It's
useful enough to everyone.

I also suggest including the friendlier version:

    template <bool flag, typename T, typename U>
    struct select
        typedef T type;
    template <typename T, typename U>
    struct Select<false, T, U>
        typedef U type;

for compilers that support partial specialization. The if_true is
compiler-friendlier but considerably harder to use (that "template" in the
middle of it is really annoying).


Boost list run by bdawes at, gregod at, cpdaniel at, john at