Boost logo

Boost :

From: Kevlin Henney (Kevlin.Henney_at_[hidden])
Date: 1999-08-04 01:21:19

Beman Dawes wrote:
>Kevlin, what did your template approach look like?
> int_exact<32>::type
> int_least<32>::type

That strikes me as better than having a single type with
exact/least/fast/etc types embedded. Not sure exactly why, but my
gut feeling is it would extend better.

   Yes, gut feelings count for a lot on this one. These are effectively
   inverse traits, in the sense that a trait is being used to look up a
   type (rather than the other way around, as for traits) and so naming the
   inverse trait directly as the template name separately seemed a more
   reasonable approach.

   I also felt this was more extensible and more fine grained than offering
   the user a basket of types, especially as the mechanisms employed for
   each looked up type are quite different: simple specialisation vs a
   'looping' search.


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