Boost logo

Boost :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2004-09-14 05:04:12

"Peder Holt" <peder.holt_at_[hidden]> wrote

> With my previous implementation, the next available compile time
> constant was included in the encoding and decoding structs, forcing
> new instantiations to be created for every typeof
> This has now been fixed.

What I totaly don't understand is how you can get the compiler reuse
templates, and still set the compile-time variables. As far as I
understand, setting a compile-time variable is a side-effect of a template
instantiation, which IMO contradicts the reuse...

> The parts that can be reused, are:
> - much of the scheme for registering templates with integral constants

I agree here.

> - All the decoding stuff (with different iterators)

Are you going to make an MPL sequence from compile time variables?

> The difference in encoding is basically that of iterators as well,
> My input to the encode struct is 2 integers (which are incremented at each
> Arkadiys input to the encode struct is a vector of integers.
> But I agree, the difference between encoding is rather large, and it
> may be more confusing than not to make a single implementation of it.

We would most likely end up with, instead one big #ifdef switch, a dozen
#ifdef switches in every file...


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