"Terje Slettebų" <[EMAIL PROTECTED]> wrote in message
031901c2b661$a1f9c9a0$cb6c6f50@pc">news:031901c2b661$a1f9c9a0$cb6c6f50@pc...
> The types yes_type and no_type (or equivalent) - that is, two types which
> are guaranteed to have different size -
[snip]
> By the way, these are defined as char and double, respectively. Are these
> required to have different size? I haven't found that guarantee in the C++
> or C standard. Theoretically, you might have an architecture which
operated
> only on values of one size, so that char and double would have the same
> size.
>
> In that case, maybe something like this could be safer:
>
> typedef char yes_type[1];
> typedef char no_type[2];
>
>
There are many variants, e.g.:

typedef double yes_type;
typedef yes_type no_type[2];

/Pavel






_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to