Re: Strangest language feature
by mikeash on Monday March 25, 2013 @02:40PM
(#5438775)
Ah! I saw that #define but didn't see the bit about failing on C++ objects that overload operator[]. I don't do C++ much so that really didn't occur to me.
I personally prefer sizeof(*(arr)), which is the same as arr[0], but I suppose C++ lets you overload that as well.
I personally prefer sizeof(*(arr)), which is the same as arr[0], but I suppose C++ lets you overload that as well.