-
Notifications
You must be signed in to change notification settings - Fork 52
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
[inplace_function] Giant Sized Buffers Required for Compilation #160
Comments
Yes please. http://sscce.org
|
@victorstewart, were you able to reproduce the issue? |
sorry! been so busy with my beta :). i’ll get you those test cases this weekend |
I ran into this issue. Might be a little contrived, I'm not sure, but here's an example where std::function works fine but stdext::inplace_function doesn't: https://godbolt.org/z/KcfYsvd15 |
@tomjwaldron: Agreed, and expected. Here's your example reduced even further: https://godbolt.org/z/6Wac8s938
Since One way to (work around, fix) your original code would be to make two sizes of type-erased functions: one to hold callbacks, and one to hold lambdas-that-capture-the-first-kind. https://godbolt.org/z/9xEYPM75W
This guarantees that |
I can generate some example cases if you guys are unaware of this circumstance, but just wanted to bring it up to confirm.
All my inplace functions are usually at most a few hundred bytes, but sometimes in order to compile one will suddenly require like 10,000 bytes! (so about 2 orders of magnitude more space). I suspect it's when you have inplace functions inside inplace functions (but leaving certainty on that aside for now).
The text was updated successfully, but these errors were encountered: