4 ms·
I'm curious about what kind of situations you're using this pattern in C++. Not objecting to the practice in any way, it's just that I haven't encountered many
by mras0 7y ago
I'm curious about what kind of situations you're using this pattern in C++. Not objecting to the practice in any way, it's just that I haven't encountered many situations where I wouldn't just have created another function for the allocating case that called the non-allocating one.
- cozzyd 7y agoSomething like... double * doMathOperation(unsigned N, const double * in, double aux1, double aux2, double * out = 0); (obviously, in C, you would leave the = 0 out and document it instead).