
On Sun, Jul 26, 2015 at 10:02 PM, John Maddock <jz.maddock@googlemail.com> wrote:
On 26/07/2015 16:33, Andrey Semashev wrote:
Hi,
I see that BOOST_NO_CXX11_HDR_CODECVT is not defined for MSVC-14, although it is known that the codecvt facets are unusable because of linkin errors:
https://connect.microsoft.com/VisualStudio/feedback/details/1348277/link-err...
You can also see STL mentioning DevDiv#1060849 here:
http://blogs.msdn.com/b/vcblog/archive/2014/11/12/visual-studio-2015-preview...
and I can see that the problem is not fixed in RTM. This also concerns std::codecvt specializations for char16_t and char32_t.
Can we define the BOOST_NO_CXX11_HDR_CODECVT macro for MSVC?
Investigating.... looks like a regression from VC12?
It seems so. The following test fails to link with VC14 and succeeds with VC10, 11 and 12. #include <cstddef> #include <locale> #include <codecvt> #include <iostream> int main() { std::locale loc; std::cout << "Has codecvt<char16_t>: " << std::has_facet< std::codecvt< char16_t, char, std::mbstate_t > >(loc) << std::endl; std::cout << "Has codecvt<char32_t>: " << std::has_facet< std::codecvt< char32_t, char, std::mbstate_t > >(loc) << std::endl; loc = std::locale(loc, new std::codecvt_utf8< wchar_t >()); loc = std::locale(loc, new std::codecvt_utf8< char16_t >()); loc = std::locale(loc, new std::codecvt_utf8< char32_t >()); loc = std::locale(loc, new std::codecvt_utf16< wchar_t >()); loc = std::locale(loc, new std::codecvt_utf16< char16_t >()); loc = std::locale(loc, new std::codecvt_utf16< char32_t >()); loc = std::locale(loc, new std::codecvt_utf8_utf16< wchar_t >()); loc = std::locale(loc, new std::codecvt_utf8_utf16< char16_t >()); loc = std::locale(loc, new std::codecvt_utf8_utf16< char32_t >()); return 0; }