-
I need to use a custom allocator to manage memory (especially GC), but I found that MSVC refused to compile my code.
Here is a godbolt link(GCC/CLang works well) |
Beta Was this translation helpful? Give feedback.
Answered by
foonathan
Nov 5, 2022
Replies: 2 comments 4 replies
-
Instead of passing an initial value, pass a lambda that returns that value: https://godbolt.org/z/xoa1xdbGj |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
foonathan
-
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Instead of passing an initial value, pass a lambda that returns that value: https://godbolt.org/z/xoa1xdbGj