-
Notifications
You must be signed in to change notification settings - Fork 13
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
Fix issues #47
Merged
Merged
Fix issues #47
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Restore Makefile to run compile matrix Add gcc 15 (trunk) toolchain
New release (!) of googletest. Docs still suggest that main should be tracked.
Update to googletest 1.15
Need to set which config to run tests with.
Remove reserved names, avoid trailing underscores in various parameter names.
Reserved names
Make tests pass. use construct_at
Force immediate function evaluation.
consteval functions to test constexpr-ness. Add test for emplace with initializer_list
Add constexpr to swap and emplace
Fix test coverage, fix typo "addressof(&value_)", consteval tests.
Make assignment operators constexpr
missing const on one overload (unlike the other monadic ops) missing constexpr on && overload Add tests to cover.
Fix or_else operations
Change to static_assert and remove_cv_t. See issue bemanproject#38
Use static assert to mandate T not nullopt_t
Change or add static_asserts to correspond to Mandates clauses. `requires` is the wrong mechanism. Also weaken the constraint on `transform` as `is_object_v` rules out a U&, however optional<U&> is allowed in beman::optional. Note to follow up change in paper wording.
Apply 'Mandates' as static_asserts
static in headers is bad. Subtle ODR violations as the variable is distinct.
In order to stand-alone, Beman optional does not require <optional> and uses its own in_place_t and nullopt_t. Possibly revist, but be consistent.
Increase efficiency, reduce complexity. Suggestion from @jwakely in bemanproject#45
Change is_optional to a variable template
These are "Working on my machine"
Enable GCC 12 and 11 in CI
neatudarius
reviewed
Jul 26, 2024
neatudarius
reviewed
Jul 26, 2024
neatudarius
reviewed
Jul 26, 2024
steve-downey
commented
Jul 26, 2024
Use test_types for no default etc.
use std::ignore for unused variables. Fix warning about non_trivial_copy_assignable default copy constructor unqualified move in yield_if
Consteval identity function requires contexpr parameter. Cleaner and shorter code.
The function must return a type that an optional can hold, so either an object or a reference.
Fix assignment operator for assign from optional<U> where U is something that can be bound to a T&. Delete the assignment from an rvalue ref as there is nothing to move and taking the pointer to temp will dangle.
Add test_tupes.cpp to make sure test_types.hpp stands alone and has a home in the compilation db.
Fixes bemanproject#49 for the constructor case. Adds failing tests, and fixes them.
neatudarius
reviewed
Aug 12, 2024
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.
LGTM overall, check my current feedback:
This avoids the most common dangling issue. Commented out test and todo complete.
Right justify mode selector in optional.cpp Add block to test_types.cpp
Remove the TestGTest tests
neatudarius
approved these changes
Aug 19, 2024
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.
LGTM 👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.