-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Describe the bug
Iterator debugging fires an assert in xmemory when the sample is built with mixed managed/unmanaged translation units. When everything is compiled as unmanaged the assert does not fire.
The sample involves a std::function passing across managed/unmanaged boundaries with placeholders for the iterators. The assert fires for foo from the managed code, but not bar from the unmanaged code. I would expect it to fire for both or neither.
Command-line test case
STL version (git commit or Visual Studio version): 0281a45
Self contained test case is at:
https://github.com/ngoozeff/iter_test
Open a Visual Studio Command Prompt to the directory containing the checked out code from above, execute the run.cmd command. run2.cmd has some setup helpers for the include paths etc, you would need to adjust to your environment.
Expected behavior
Program runs cleanly.
Additional context
Microsoft (R) C/C++ Optimizing Compiler Version 19.23.28105.4 for x64