Skip to content

sframe api refactor#84

Merged
bifurcation merged 4 commits into
cisco:mainfrom
k-wasniowski:sframe-api
Mar 23, 2026
Merged

sframe api refactor#84
bifurcation merged 4 commits into
cisco:mainfrom
k-wasniowski:sframe-api

Conversation

@k-wasniowski

Copy link
Copy Markdown
Contributor

No description provided.

@bifurcation bifurcation left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, except for (a) unwrap() being a macro not a method, and (b) no #ifdef guards around unwrap().

Comment thread test/common.h Outdated

// Unwrap a Result<T> in a test context. Throws std::runtime_error on error
// so doctest can catch and report it.
#define UNWRAP(expr) \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make this a method on Result<T>. There's no reason it needs to be a macro.

It seems like it would be good to #ifdef guard this so that it is only built when exceptions are enabled. That way if you try to build code with unwrap() without exceptions, you'll get a clean hard failure. Looking at documentation, it seems like #ifdef __cpp_exceptions would work.

Comment thread test/common.h Outdated
Co-authored-by: Richard Barnes <rlb@ipv.sx>
@k-wasniowski k-wasniowski force-pushed the sframe-api branch 4 times, most recently from 9dd1ec2 to 356aa9f Compare March 16, 2026 13:18
@bifurcation

Copy link
Copy Markdown
Collaborator

Thanks for the work on this @k-wasniowski !

@bifurcation bifurcation merged commit 2049052 into cisco:main Mar 23, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants