Investigate and report ICE
- Dominant language
- C++
- Stars
- 1.5k
- Forks
- 176
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 1
Description
> *test-2 and test-3:*
> https://github.com/madmongo1/pfr_review/blob/master/pre-cxx20/test-2.cpp
> Seems to produce infinite recursive template expansion
The example should not compile, because the nested types are not aggregates.
In C++14 it gives a correct static assert
../../../boost/pfr/detail/core14_classic.hpp:509:5: error:
static_assert failed "====================> Boost.PFR: Type can not be
used is flat_ functions, because it's not POD"
in C++17 it also gives a correct static assert
../../../boost/pfr/detail/fields_count.hpp:225:9: error: static
assertion failed: ====================> Boost.PFR: Type must be
aggregate initializable.
Clang crashes after that.
GCC goes into an infinite loop, ignoring all the template
instantiation depth limitations and static_assert messages printing.
Using BOOST_PFR_PRECISE_FUNCTIONS_FOR now gives a complaint of missing
sd::hash specialization:
../../../boost/pfr/detail/functional.hpp:133:9: error: static_assert
failed due to requirement 'sizeof(boost::basic_string_view >) && false' "====================> Boost.PFR:
std::hash not specialized for type T"
I've added the tests and will report issues to the compiler developers soon.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the linked pre-cxx20/test-2.cpp and test-3.cpp examples and reproduce them under C++14 and C++17. Compare the diagnostics and behavior around core14_classic.hpp, fields_count.hpp, and functional.hpp; done means the compiler failures are characterized and suitable reports can be sent to the compiler developers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100