You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was changing some validate functions that would throw an exception or else just return if the input data is valid to use tl::expected.
The below code doesn't work if tl::expected<void, error> is used and an error is returned from validate but does if I replace with tl::expected<int, error>
// returns error if problem otherwise just returns
tl::expected<void, error> validate(const data&);
...
voidcheckData(const data& data ) {
validate(data).or_else([](error&& error) { throw error; }; // cores in error destructor
}
The text was updated successfully, but these errors were encountered:
Sorry for taking this long but yes it was with GCC 7
Regards
Peter Muldoon
On Monday, July 19, 2021, 11:37:23 AM EDT, Manuel Meraz ***@***.***> wrote:
Reproduced with GCC 7.5
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
I was changing some validate functions that would throw an exception or else just return if the input data is valid to use tl::expected.
The below code doesn't work if tl::expected<void, error> is used and an error is returned from validate but does if I replace with tl::expected<int, error>
The text was updated successfully, but these errors were encountered: