Skip to content
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

fixes inverted order of member list for refl::util::detail::filter(..) #65

Merged
merged 2 commits into from
Jan 8, 2022

Conversation

RalphSteinhagen
Copy link
Contributor

This seemed to be the least invasive fix for the issue.

N.B. needed to bump the catch unit-test library version to be able to build on a more Linux OS

reasons: `static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;`
For modern Linux systems the underlying MINSIGSTKSZ became a non-`constexpr` system call ‘long int sysconf(int)’

N.B. this is probably one of the last single-header catch2 distributions as they seem to move for v3.x.y to a [multi-header statically compiled library](https://github.com/catchorg/catch2/releases#repo-content-pjax-container) distribution model.
apparently the 'append_t' needed to change to 'prepend_t' introduced in #a5819553

possible fix for issue veselink1#64
Copy link
Owner

@veselink1 veselink1 left a comment

Choose a reason for hiding this comment

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

The fix looks good. The -Wall option is very good to have enabled for the tests as well.

The Catch2 update appears to be necessary because glibc 2.34 removed MINSIGSTKSZ (as you said).

I can't believe this slipped into 0.12.2🤦. Thanks for the help with this.

constexpr type_list<int, float> flt = util::filter(type_list<int, float>{}, [](auto ) { return true; });
REQUIRE( flt.size == 2 );
constexpr int first = find_first(type_list<int, float>{}, [](auto ) { return true; });
REQUIRE( std::is_same_v<decltype(first), const int> );
Copy link
Owner

Choose a reason for hiding this comment

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

The funny thing with most of the refl-cpp tests is that they wouldn't even compile if the types were not correct. This is the case here as well (first is explicitly typed as int). Nevertheless, I use REQUIRE everywhere too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Was thinking of static_assert as well but since the other test use REQUIRE I went down that same route.

Thanks for merging!

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.

None yet

2 participants