Re:Why should I have written ZeroMQ in C, not C++ (2012)
by Koshkin on Wednesday December 12, 2018 @08:36PM
(#18669245)
Hmm... Do you really need to wrap a pointer in std::optional?
[ Parent
| on HN ]
Re:Why should I have written ZeroMQ in C, not C++ (2012)
by int_19h on Thursday December 13, 2018 @06:18AM
(#18671466)
It forces anyone trying to use it to contemplate the no-value case.
Re:Why should I have written ZeroMQ in C, not C++ (2012)
by kllrnohj on Thursday December 13, 2018 @12:44PM
(#18674291)
Replace the pointer with a value type and now you'd see why the optional is necessary.
Similarly I'd probably substitute the optional with a variant that has the actual error code. Go nuts with whatever you want here.