Boost logo

Boost Users :

From: Pedro Lamarão (pedro.lamarao_at_[hidden])
Date: 2006-10-19 10:01:37


Peter Dimov escreveu:
> Terry G wrote:
>> I've just finished reading C++ Template Metaprogramming again.
>> I just don't get it.
>>
>> Why would someone use a type container?
>
> Imagine a case where for some reason you would like to call
>
> register<X, Y>();
>
> for all combinations of X1..Xm and Y1..Yn. Writing the calls by hand gets
> tedious. If you put Xi and Yi in type sequences, you can write a metaprogram
> that generates the calls.

I have to say this is probably the most convincing example I've seen
since the last time I read that tutorial thing about representing
physical quantities.

--
  Pedro Lamarão

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net