$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2002-10-09 16:52:07
Yitzhak Sapir wrote:
> > Nope, because due to its variadic interface 'list_c<T,...>'
> > needs to reserve some single value for denoting unused
> > arguments, and taking that value out of range of possible
> > values of type 'T' is not really a feasible option
> > (consider, for instance, T == bool).
>
> This seems to work on VC:
>
> template <class T> struct LargerThan
> {
> typedef long type;
> enum { illegal_value = 0xBADBAD };
> };
>
> template <> struct LargerThan<bool>
> {
> typedef char type;
> enum { illegal_value = -1 };
> };
>
> // For pointers, illegal value is 0 (or perhaps, 1)
>
> template <class T, LargerThan<T>::type c1 =
> LargerThan<T>::illegal_value>
> struct list_c
> {
> ...
> };
How does it change anything? I mean, from the user's point of view, what
change in observable behavior it achieves, if any, and what specific problem
this change solves?
Aleksey