-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Get rid of recursive template instantiations for concatenating type signatures on C++17 and higher #4587
Get rid of recursive template instantiations for concatenating type signatures on C++17 and higher #4587
Conversation
Looks great! |
…concatenating type signatures
b979264
to
ac3e70b
Compare
Hi, thanks! |
I'm totally convinced the one failed job (🐍 pypy-3.7 • windows-2022 • x64) is a flake unrelated to this PR. I'm rerunning it anyway to clearly rule out any doubts. |
Thanks for figuring this out! |
…added with master PR pybind#4587
* use C++17 syntax to get rid of recursive template instantiations for concatenating type signatures (#4587) * Apply descr.h `src_loc` change (smart_holder PR #4022) to code added with master PR #4587 * Add test_class_sh_property_non_owning to CMakeLists.txt (fixes oversight in PR #4586) * Resolve clang-tidy errors. * clang-tidy auto fix --------- Co-authored-by: Konstantin Bespalov <kos5tya@yandex.ru>
FYI, updated the feature testing macro to better match elsewhere in the codebase in a follow up PR #4592. |
I'm still getting the error under 2.10.4 (assuming that release got this change) |
Hi, @rwgk do you have any estimates regarding new version release date? |
@henryiii has been doing the releases. Could/should we cut a 2.10.5 release? |
Description
I have had the same error as #1828 when tried to compile big class with a lot of properties and methods with a big number of arguments. I had this issue compiling C++17 standard on MSVC. Unlike GCCs(-ftemplate-depth), for example, MSVC does not have the ability to configure the depth of template instantiation, and on large and complex classes, the compiler's limit can be reached. Since C++17 recursive implementation of
concat
function can be replaced with fold expression. This change has helped me in my case.Suggested changelog entry: