2 ms·
C++ compilers also have references to arrays which can be abused in some cases: template < size_t len > int read(int fd, char (&buf)[len]); // array size w
by MaulingMonkey 9y ago
C++ compilers also have references to arrays which can be abused in some cases:
template < size_t len > int read(int fd, char (&buf)[len]); // array size will be infered
int read(int fd, char (&buf)[1024]); // array size must be exactly 1024