Skip to content

Replace assert macro #16

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

Closed
wants to merge 22 commits into from
Closed

Replace assert macro #16

wants to merge 22 commits into from

Conversation

rsore
Copy link
Owner

@rsore rsore commented Sep 1, 2024

Replaced CLARGS_ASSERT() macro with CLArgs::_internal::debug_assert() function. Function-like macros contradict ES.31 in the C++ Core Guidelines and tend to clutter the global namespace, which is less than optimal for a library.

Closes #12.

@rsore rsore added the improvement Improvement to existing feature label Sep 1, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

Copy link

github-actions bot commented Sep 1, 2024

clang-tidy review says "All clean, LGTM! 👍"

Copy link

github-actions bot commented Sep 1, 2024

clang-tidy review says "All clean, LGTM! 👍"

Copy link

github-actions bot commented Sep 1, 2024

clang-tidy review says "All clean, LGTM! 👍"

Copy link

github-actions bot commented Sep 1, 2024

clang-tidy review says "All clean, LGTM! 👍"

Copy link

github-actions bot commented Sep 1, 2024

clang-tidy review says "All clean, LGTM! 👍"

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

@@ -10,6 +10,7 @@ using ConfigOption = CLArgs::Option<"--config,--configuration,-c", "<filepath>",
int
main(int argc, char **argv)
{
int s = 3;
Copy link

Choose a reason for hiding this comment

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

warning: unused variable 's' [clang-diagnostic-unused-variable]

    int                                       s = 3;
                                              ^

@rsore rsore closed this Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement to existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use std::source_location for assertions
1 participant