34 ms·
Best just to use std::exception as the base class and derive from that, then if you want to get a stack trace just rethrow the contained exception. I've tried
by pixel_fcker 10y ago
Best just to use std::exception as the base class and derive from that, then if you want to get a stack trace just rethrow the contained exception.
I've tried using this and my own implementation of Result<T,E> based on Alexandrescu's original talk, and both are significantly slower that C error codes or exceptions using the test program in the OP.