Boost logo

Boost :

From: Martin Wille (mw8329_at_[hidden])
Date: 2006-04-29 08:38:18


Dmitry Sychov wrote:

> void main() {

This line is incorrect. main() returns int.

> I understand original code - but it uses
> "is_reference_helper1" and "is_reference_helper2" for the same
> thing - ie to distingwish between fn pointer size and char size but
> this could be done in "one pass" (see my is_ref_fn(..) above)

The original code supports broken compilers.

> Is it just because on some platforms sizeof(char) != 1 ?

sizeof(char) is 1 by definition.

> If yes we can change 'char' to object with size >= sizeof(T&)
> to avoid this.

Types other than char (e.g. int or long) can also have size 1.

Regards,
m
Send instant messages to your online friends http://au.messenger.yahoo.com


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk