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

Add index variable template to get index of member pointer #176

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

uyha
Copy link

@uyha uyha commented Aug 12, 2024

closes #60

@uyha
Copy link
Author

uyha commented Aug 12, 2024

@apolukhin I could not find the document on how to contribute, could you direct me on the following matters?

  • How to run the tests locally? How do I add test?
  • I use requires in the implementation, should I drop to SFINAE to support C++17?
  • There is a case that the index cannot be found, what should I do there?

@apolukhin
Copy link
Member

How to run the tests locally? How do I add test?

cd boost/libs/pfr/tests
../../../b2 cxxstd=17

I use requires in the implementation, should I drop to SFINAE to support C++17?

Yes, please

There is a case that the index cannot be found, what should I do there?

How about returning std::optional ? Or you could throw an exception. Or return -1. Write some samples and experiment to get the idea of which error reporting mechanic is better for that function.

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.

want to add pointers to data members -> index
2 participants