mongodb/mongo-cxx-driver — pull request #55 by acmorrow (2014-04-16 21:03:49+00:00)
Title: CXX-81 Tag all exported free functions with calling convention macro

OK, this tags all exported free functions and static members of exported classes as being explicitly __cdecl. This should protect against consumers changing the default with http://msdn.microsoft.com/en-us/library/46t77ak2.aspx, since it explicitly does not affect member functions.

I was only sort of able to test this without building my own boost with an alternate calling convention from source, but I was able to get it so that if I built the shared library client examples with /Gr, switching the default to __fastcall, that there were no unresolved symbols from the mongo environment, as there would be if we had not tagged the functions correctly.

Obviously this only verifies the functions that were actually consumed by the client tests, but it is a start.