2 ms·
Your connect method can still throw std::bad_alloc.
by hendzen 11y ago
Your connect method can still throw std::bad_alloc.
- IshKebab 11y agoYou could easily catch that within the method though. But in general I think throwing an exception on memory allocation failure is much better than the alternative, which is - in practice - assuming it succeeds and segfaulting.