Some usage scenarios build the library with /Zc:wchar_t- but mix both unsigned short* and wchar_t* client usage. For this opt-in build scenario, the library will link with both the non-native and native wchar_t.
Note this works for general use, but not necessarily all use cases. For example, all the effect and texture factory virtual methods are defined only using the type that matches the compiler setting for the library, as there's no easy way to provide an adapter for these. There are also some edge-cases like SpriteFont::GetDefaultCharacter that you can't use a link-time adapter because the overloading rules don't allow only differing by return type.
Also fixes some Code Analysis warnings as you can't use _In_opt_ with std::function<>.
Some usage scenarios build the library with
/Zc:wchar_t-
but mix bothunsigned short*
andwchar_t*
client usage. For this opt-in build scenario, the library will link with both the non-native and nativewchar_t
.Note this works for general use, but not necessarily all use cases. For example, all the effect and texture factory virtual methods are defined only using the type that matches the compiler setting for the library, as there's no easy way to provide an adapter for these. There are also some edge-cases like
SpriteFont::GetDefaultCharacter
that you can't use a link-time adapter because the overloading rules don't allow only differing by return type.