Sirius  0.0.0
concurrent_queue_error_code.h
Go to the documentation of this file.
1 
22 #ifndef SIRIUS_UTILS_CONCURRENT_ERROR_CODE_H_
23 #define SIRIUS_UTILS_CONCURRENT_ERROR_CODE_H_
24 
25 #include <system_error>
26 
27 // This implementation is inspired by
28 // https://akrzemi1.wordpress.com/2017/07/12/your-own-error-code/
29 
30 namespace sirius {
31 namespace utils {
32 
37  kSuccess = 0,
39 };
40 
48 std::error_code make_error_code(ConcurrentQueueErrorCode errc);
49 
50 } // namespace utils
51 } // namespace sirius
52 
53 namespace std {
54 
55 template <>
56 struct is_error_code_enum<sirius::utils::ConcurrentQueueErrorCode>
57  : std::true_type {};
58 
59 } // namespace std
60 
61 #endif // SIRIUS_UTILS_CONCURRENT_ERROR_CODE_H_
Definition: exception.h:27
std::error_code make_error_code(ConcurrentQueueErrorCode errc)
Make an error code from ConcurrentQueueErrorCode enum.
Definition: error_code.h:70
ConcurrentQueueErrorCode
Enum of concurrent queue error codes.
Definition: concurrent_queue_error_code.h:36