Boost logo

Boost :

From: Anatoli Tubman (anatoli_at_[hidden])
Date: 2004-01-12 05:13:23

> > My other idea was this:
> >
> > typedef tag < 'm', 'e', 't', 'r', 'e' > metre_tag;
> > typedef tag < 's', 'e', 'c', 'o', 'n', 'd'> second_tag;
> >
> > One can sort on such tags at compile time. But the syntax is too ugly.
> > C++ rules on what can constitute constant expression and template
> > argument
> > should be seriously relaxed IMO.
> Given the resistance that simple template syntax is encountering from
> some quarters, I can't
> imagine that this sort of tortured syntax would be popular ;^) Just
> adding string template arguments
> would go a long way toward facilitating metaprogramming...

Well, the end-users will rarely define new unit tags, and even if,
it's once per program. I think it's a small price to pay for better
compile times. I think it should be seriously considered.

Another idea in the same direction is to use sha1 digest of a sufficiently
unique string as the sorting tag. 160 bits is just 5 unsigned longs.


anatoli at ptc dot com -- opinions are mine

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