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

Workaround for broken C++17 stuctured binding in old compilers #119

Merged
merged 2 commits into from
Jan 10, 2023

Conversation

denzor200
Copy link
Contributor

This PR fixes compile-time errors like this:

/usr/bin/../lib/gcc/x86_64-linux-gnu/5.5.0/../../../../include/c++/5.5.0/tuple:807:33: error: implicit instantiation of undefined template 'std::tuple_size<my_struct>'
    : integral_constant<size_t, tuple_size<_Tp>::value> { };
                                ^
./boost/pfr/detail/core17_generated.hpp:57:9: note: in instantiation of template class 'std::tuple_size<const my_struct>' requested here
  auto& [a,b,c] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate.

@coveralls
Copy link

coveralls commented Jan 9, 2023

Pull Request Test Coverage Report for Build 3876622619

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 3862777246: 0.0%
Covered Lines: 372
Relevant Lines: 372

💛 - Coveralls

@denzor200
Copy link
Contributor Author

This snippet shows that the fix works: https://godbolt.org/z/6YKh335q3

@apolukhin apolukhin merged commit 2775d19 into boostorg:develop Jan 10, 2023
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.

3 participants