Easton Man's Channel
8 hours ago
Daniel Lemire's blog
In C++, = default and {} are not the same constructor
source
Daniel Lemire's blog
In C++, = default and {} are not the same constructor
You can write an empty default constructor as span() = default or as span() {}. It can have remarkable effects on performance. struct span { const char *p; int len; const char *end; span() = default; // or span() {} span(const char *s, int n) : p(s), len(n)…
Home
Powered by
BroadcastChannel
&
Sepia