Boost logo

Boost :

From: jhrwalter (walter_at_[hidden])
Date: 2002-01-18 17:44:03


--- In boost_at_y..., "vesa_karvonen" <vesa_karvonen_at_h...> wrote:
> --- In boost_at_y..., Toon Knapen <toon.knapen_at_s...> wrote:
> > jhrwalter wrote:
> >
> > > I once experimented with something like this. But an easy
> > > implementation seemed to require partial template
specialization
> > > (especially for matrix row and column iterators) and I was tired
> > > of workarounds for the most popular compiler ;-)
> [...]
> > On the other hand, I believe that VC++ is your main development
> > platform so this might not be an option for you ?
>
> See 10.14 Partial Evaluation in C++, pages 493-496, in Generative
> Programming (ISBN 0-201-30977-7) for an alternative workaround.

I should really take the time to read it.

> Basically, just use a function like this:
>
> template<int N> ... size(Int<N>);
>
> Works in MSVC++ 6 and has neat syntax.

How do you like the idea of using free functions like

template<class M, int N>
size_t size (const M &m, int<N>);

for these operations instead?

Regards

Joerg


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk