http://bugs.winehq.org/show_bug.cgi?id=27698
--- Comment #8 from Dan Kegel dank@kegel.com 2012-07-24 07:29:00 CDT --- Created attachment 41133 --> http://bugs.winehq.org/attachment.cgi?id=41133 Better test case
Here's a more useful testcase. The attached archive contains z.cc,
#include <stdio.h> #include <vector> using namespace std; int main() { vector<int> foo; vector<int> bar; vector<int> baz; foo.push_back(1); swap(foo, bar); baz = bar; printf("top of baz is %d\n", baz.back()); return 0; }
and z.exe produced by visual c++ 2010's cl /MD /Od /EHsc z.cc. This executable imports the two symbols ?_Swap_all@_Container_base0@std@@QAEXAAU12@@Z ?_Orphan_all@_Container_base0@std@@QAEXXZ from msvcp100. Container_base0 is visual c++'s no-op version of iterator checking (see the stack overflow answer and http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Advanced-STL/C... ), and compiling the test app with /E shows that those functions are available inline and are empty. Because of /Od (or, in real apps, optimizer failure), the inline versions aren't used, and msvcp100 has to provide empty versions.