Boost logo

Boost :

From: Matthias Schabel (boost_at_[hidden])
Date: 2007-02-14 16:33:49

> The tags can be sortable without enumeration. The problem is that
> the ordering will be different in every translation unit....

So, as I understand it, the compiler has to generate a unique
typename for
every class, and that has to be consistent over all translation
units. It also
seems to me that somewhere this must get hashed into an integral value
or something so the compiler doesn't have to deal with strings as
identifiers. Since we don't really care what enumerable value gets
to what system or to what tag, if we could somehow access the full
or (even better) an integral hash of it, that would give us our
sortable value
automatically. For example, on g++ gives :




If these could be hashed into a long int, that would be all we
needed. Probably
would involve very non-portable code, but it might be supportable on
a few
of the major compilers... I thought C++ name mangling was supposed to be

> I would probably sort by dimension first to make checking the
> dimensions easier.

The way I'm envisioning it, any dimension typelist


would split into three typelists that are equivalent to the
dimension<>::type typelist
we construct now. These could then be treated separately, and
appended afterwards.
Since no inter-system conversion happens in the operators, I think
that's all that would
happen. This will definitely not happen before the review, but I
think it could be done
and would be interesting...


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