Skip to content

Conversation

@Flamefire
Copy link
Contributor

Verify the constructor and increment/decrement operators

I wasn't sure

data::size_t operator--(int) { data::size_t res(*this); if( !is_inf() ) m_value--; return res; }
works as expected as the templated ctor might be preferred which would not copy the is_inf

The test also shows some inconsistencies in the over/underflow handling. It might be better to remove any operator taking a std::size_t which means those values will get converted to data::size_t and can be consistently handled.

Verify the constructor and increment/decrement operators
Copy link
Member

@mborland mborland left a comment

Choose a reason for hiding this comment

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

LGTM

@mborland
Copy link
Member

mborland commented Feb 3, 2025

The test also shows some inconsistencies in the over/underflow handling. It might be better to remove any operator taking a std::size_t which means those values will get converted to data::size_t and can be consistently handled.

Yeah, that would likely be an improvement.

@mborland mborland merged commit 89fe464 into boostorg:develop Feb 3, 2025
40 checks passed
@Flamefire Flamefire deleted the incDecTests branch February 3, 2025 19:56
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