Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-02-21 16:18:20

In my use of type_traits, I've frequently wanted to be able to turn boolean
values into tags for tag dispatching, e.g.:

    return dispatch_function(&x, boost::is_const<X>::type());

As it stands, I can write:

    template <bool> struct bool_t {};
    return dispatch_function(&x, bool_t<boost::is_const<X>::value>());

But, it's a little cumbersome, and nearly all of type_traits ICEs are
expressed in terms of yes_type and no_type anyway. Any chance of
institutionalizing this and making it public?


                  David Abrahams
      C++ Booster ( O__ ==
      Pythonista ( c/ /'_ ==
  resume: (*) \(*) ==
          email: david.abrahams_at_[hidden]

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