1
Ideas / Re: Array types
« on: February 14, 2015, 11:04:18 PM »
I found this proposal by John Nagel on Lambda The Ultimate : http://lambda-the-ultimate.org/node/4573
The idea is to tie together parameters in a function declaration so the compiler can see that one of the parameters is the length of the array in the other parameter. Look at the "n" in this example he gives:
int read(int fd, char (&buf)[n], size_t n);
Even if this proposal isn't appropriate, maybe the reaction and discussion is informative.
The idea is to tie together parameters in a function declaration so the compiler can see that one of the parameters is the length of the array in the other parameter. Look at the "n" in this example he gives:
int read(int fd, char (&buf)[n], size_t n);
Even if this proposal isn't appropriate, maybe the reaction and discussion is informative.