Hacker News new | past | comments | ask | show | jobs | submit login

Before the array decays to a pointer, you can get its length.

Here is the implementation of std::begin for arrays in libc++: https://github.com/llvm-mirror/libcxx/blob/60d223df071f6e3d4...




Quite right, I'm apparently rusty on my stdlib knowledge. Didn't know about the reference trick.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: