Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2003-12-14 18:15:13

"Reece Dunn" <msclrhd_at_[hidden]> wrote in message
> Jonathan Turkanis wrote:
> >I have occassionally used mpl::bool_ as a tool for compile-time dispatch
> >based on a boolean condition. <snip>
> As for the example not being self-documenting, could you not do something
> like:
> namespace detail
> {
> typedef mpl::true_ integral_type;
> typedef mpl::false_ nonintegral_type;
> <snip>
> }


I like using bool_ because its totally self-contained. If I wan't to be
self-documenting, I usually write something like this:

        namespace detail { template<bool B> struct is_integral_tag { }; }



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