(a) It happens to use 'boost::system::error_code', which is a complete
C++03 implementation compatible with C++11's <system_error>.

(b) C++11 libraries can consider moving to 'std::error_code'. Otherwise,
an "adapter" can be implemented to enable 'boost::system::error_code' to
inter-operate with C++11's 'std::error_code'. A nice blog article by Bjorn
Reese on that topic can be found at:
http://breese.github.io/2016/06/18/unifying-error-codes.html

(c) The C++11 'class std::system_error : public std::runtime_error { ...};'
is a convenience utility to 'throw' a 'std::error_code' value as
"payload". Since your 'read()' function signature (by convention) appears
to be non-throwing, you wouldn't need 'std::system_error' here (as the
'std::error_code' can be populated directly in the function body).