Skip to content

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

Merged
apolukhin merged 2 commits into
boostorg:developfrom
denzor200:fix/broken_structured_binding2
Jan 10, 2023
Merged

Workaround for broken C++17 stuctured binding in old compilers#119
apolukhin merged 2 commits into
boostorg:developfrom
denzor200:fix/broken_structured_binding2

Conversation

@denzor200

Copy link
Copy Markdown
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

coveralls commented Jan 9, 2023

Copy link
Copy Markdown

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
Copy Markdown
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