Boost logo

Boost :

From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-06-04 17:22:32


Larry Evans wrote:
> Steven, there was also something on the c.l.c++.m newsgroup about this.
> There's even a comparison with switch_ here:

Ok. I think that the easiest way to state the difference is that Switch
is a lower level generic
component, while the solution proposed there is specific to accessing
tuples. Both the performance
considerations mentioned in that post can be implemented on top of
switch. Optimizing away the
default can be handled by passing a function object like

template<class R>
struct never_called {
    template<class N>
    R operator()(N) { __assume(0); }

In Christ,
Steven Watanabe

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