Using the latest Visual Studio Community Preview (15.6.0 Preview 2), the following code fails to link:
#include <locale>
int main()
{
std::locale loc;
auto const& cvt = std::use_facet<std::codecvt<char32_t, char, std::mbstate_t>>(loc);
}
The error is:
error LNK2001: unresolved external symbol "public: static class std::locale::id std::codecvt<char32_t,char,struct _Mbstatet>::id" (?id@?$codecvt@_UDU_Mbstatet@@@std@@2V0locale@2@A)
I've heard that this may be due to Visual C++ bug. Can anyone suggest a workaround?