UNISTDX_CHECK_IO

Check if func equals -1 and throw sys::bad_call with error code and error location unless errno(3) equals EAGAIN or EINPROGRESS. In that case set func to 0.

UNISTDX_CHECK

Check if func equals -1 and throw sys::bad_call with error code and error location.

UNISTDX_BASE_CHECK
UNISTDX_THROW_BAD_CALL

Uncoditionally throw sys::bad_call with error code and error location.

UNISTDX_CHECK2

Check if func equals ret and throw sys::bad_call with error code and error location.

template <class T>
check(T * ret) -> T *
template <class T>
check(T ret, T bad_ret) -> T
template <class T>
check(T ret) -> T