
29 Apr
2006
29 Apr
'06
12:38 p.m.
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