<a id="title"/> **[T](#title)itle**: Non-object declaration before `this` member [ICE][]s. <a id="rep"/> <a id="cpp2"/> **[M](#rep)inimal reproducer** (<https://cpp2.godbolt.org/z/Kdbz8h311>): ```Cpp2 my_time: type = { rep: type == cpp2::longdouble; this: duration; } main: () = { } ``` <a id="cmd"/> <details><summary> <b><a href="#cmd">C</a>ommands</b>: </summary> ```bash cppfront main.cpp2 clang++18 -std=c++23 -stdlib=libc++ -lc++abi -pedantic-errors -Wall -Wextra -Wconversion -Werror=unused-result -I . main.cpp ``` </details> <a id="expected"/> **[E](#expected)xpected result**: A well-formed program. <a id="actual"/> **[A](#actual)ctual result and error**: `Segmentation fault (core dumped)`. <a id="see"/> **[S](#see)ee also**: - #471, <https://github.com/hsutter/cppfront/issues/471#issuecomment-1564504114>. [ABI]: https://quuxplusone.github.io/blog/2019/08/02/the-tough-guide-to-cpp-acronyms/#abi-api [ADL]: https://quuxplusone.github.io/blog/2019/08/02/the-tough-guide-to-cpp-acronyms/#adl [CNTTP]: https://quuxplusone.github.io/blog/2019/08/02/the-tough-guide-to-cpp-acronyms/#cnttp [CPO]: https://quuxplusone.github.io/blog/2019/08/02/the-tough-guide-to-cpp-acronyms/#cpo [CRTP]: https://quuxplusone.github.io/blog/2019/08/02/the-tough-guide-to-cpp-acronyms/#crtp [CTAD]: https://quuxplusone.github.io/blog/2019/08/02/the-tough-guide-to-cpp-acronyms/#ctad [WG]: https://quuxplusone.github.io/blog/2019/08/02/the-tough-guide-to-cpp-acronyms/#cwg-ewg-ewgi-lewg-lewgi-lwg [SG]: https://quuxplusone.github.io/blog/2019/08/02/the-tough-guide-to-cpp-acronyms/#cwg-ewg-ewgi-lewg-lewgi-lwg [ICE]: https://quuxplusone.github.io/blog/2019/08/02/the-tough-guide-to-cpp-acronyms/#ice [IFNDR]: https://quuxplusone.github.io/blog/2019/08/02/the-tough-guide-to-cpp-acronyms/#ifndr [II]: https://quuxplusone.github.io/blog/2019/08/02/the-tough-guide-to-cpp-acronyms/#iile [NSDMI]: https://quuxplusone.github.io/blog/2019/08/02/the-tough-guide-to-cpp-acronyms/#nsdmi [NTTP]: https://quuxplusone.github.io/blog/2019/08/02/the-tough-guide-to-cpp-acronyms/#nttp [ODR]: https://quuxplusone.github.io/blog/2019/08/02/the-tough-guide-to-cpp-acronyms/#odr [PIMPL]: https://quuxplusone.github.io/blog/2019/08/02/the-tough-guide-to-cpp-acronyms/#pimpl [QoI]: https://quuxplusone.github.io/blog/2019/08/02/the-tough-guide-to-cpp-acronyms/#qoi [RVO]: https://quuxplusone.github.io/blog/2019/08/02/the-tough-guide-to-cpp-acronyms/#rvo-nrvo-urvo [SBO]: https://quuxplusone.github.io/blog/2019/08/02/the-tough-guide-to-cpp-acronyms/#sbo-soo-sso [SCARY]: https://quuxplusone.github.io/blog/2019/08/02/the-tough-guide-to-cpp-acronyms/#scary-iterators [SFINAE]: https://quuxplusone.github.io/blog/2019/08/02/the-tough-guide-to-cpp-acronyms/#sfinae [SMF]: https://quuxplusone.github.io/blog/2019/08/02/the-tough-guide-to-cpp-acronyms/#smf [STL]: https://quuxplusone.github.io/blog/2019/08/02/the-tough-guide-to-cpp-acronyms/#stl [TMP]: https://quuxplusone.github.io/blog/2019/08/02/the-tough-guide-to-cpp-acronyms/#tmp [TU]: https://quuxplusone.github.io/blog/2019/08/02/the-tough-guide-to-cpp-acronyms/#tu [UB]: https://quuxplusone.github.io/blog/2019/08/02/the-tough-guide-to-cpp-acronyms/#ub [UDL]: https://quuxplusone.github.io/blog/2019/08/02/the-tough-guide-to-cpp-acronyms/#udl [UFCS]: https://quuxplusone.github.io/blog/2019/08/02/the-tough-guide-to-cpp-acronyms/#ufcs
Title: Non-object declaration before
thismember ICEs.Minimal reproducer (https://cpp2.godbolt.org/z/Kdbz8h311):
Commands:
cppfront main.cpp2 clang++18 -std=c++23 -stdlib=libc++ -lc++abi -pedantic-errors -Wall -Wextra -Wconversion -Werror=unused-result -I . main.cppExpected result: A well-formed program.
Actual result and error:
Segmentation fault (core dumped).See also:
thiscan't use the current type beyond its full name #471, [BUG] Type ofthiscan't use the current type beyond its full name #471 (comment).