-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
optref, error, bytes, hex #1
base: master
Are you sure you want to change the base?
Conversation
#define Q_ERROR_LOCATION \ | ||
(::qtils::ErrorLocation{__PRETTY_FUNCTION__, __FILE__, __LINE__}) | ||
|
||
#define Q_ERROR(error_) (::qtils::Error{Q_ERROR_LOCATION, error_}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#define Q_ERROR(error_) (::qtils::Error{Q_ERROR_LOCATION, error_}) | |
#define Q_ERROR(error_) (::qtils::Error{Q_ERROR_LOCATION, (error_)}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not an error here (MUL(a,b)a*b; ADD(2+3,4+5); 2+3*4+5
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/qtils -> include/qtils ?
}; | ||
|
||
/** | ||
* Used by `OptRef` to reset `T *` on move. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please comment with more details.
|
||
namespace qtils { | ||
/** | ||
* Used to reset `std::coroutine_handle` on move. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please comment with more details.
const char *fn; | ||
const char *file; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
string_view?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't want to increase sizeof(ErrorLocation)
,
these macro strings are always zero terminated
Outcome<T>
,Errors
,Error
,Q_ERROR
,Q_TRY
outcome::result<T>
,OUTCOME_TRY
OptRef<T>
Bytes
,BytesN<N>
,BytesIn
,BytesOut
"{}" = "0x0102…0506"
,"{:x}" = "010203040506"
,"{:0x}" = "0x010203040506"