|
Boost : |
From: Terje Slettebø (tslettebo_at_[hidden])
Date: 2003-01-04 10:28:45
>From: "Terje Slettebø" <tslettebo_at_[hidden]>
> >From: "Aleksey Gurtovoy" <agurtovoy_at_[hidden]>
>
> > How would you call an 'apply' counterpart that takes a metafunction
class
> > and a _sequence_ of arguments, i.e.:
> >
> template<>
> struct plus<default_type, default_type>
> {
> template<class T1, class T2, class T3, class T4, class T5>
> struct apply { ... }
>
> template<class Sequence>
> struct apply { ... }
> };
Since this doesn't exist, maybe one could use something like:
template<class T1, class T2 = void, class T3 = void, class T4 = void, class
T5 = void>
struct plus { ... };
// Specialisation for sequence
template<class T>
struct plus<T, void, void, void, void> { ... };
And the same for the lambda version (with the apply-member). This does use
partial specialisation, though.
Regards,
Terje
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk