[Boost-bugs] [Boost C++ Libraries] #11541: Building with /Zc:wchar_t- on VC causes errors in boost::log since 1.59.0

Subject: [Boost-bugs] [Boost C++ Libraries] #11541: Building with /Zc:wchar_t- on VC causes errors in boost::log since 1.59.0
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-08-17 12:49:46


#11541: Building with /Zc:wchar_t- on VC causes errors in boost::log since 1.59.0
------------------------+------------------------------
 Reporter: dd0t@… | Type: Bugs
   Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.59.0
 Severity: Regression | Keywords:
------------------------+------------------------------
 Boost 1.58.0 and earlier could be built successfully with '/Zc:wchar_t-'
 (no native wchar_t type) set. Since boost 1.59.0 this causes template
 errors in boost log. More specifically in code_conversion.hpp . I'm not
 quite clear on whether boost is actually interested in being able to build
 with this flag enabled in the first place, however I won't be the only one
 seeing this regression as it isn't unusual for this flag to be present in
 Windows projects. For example Qt was built with it throughout the 4.X
 series and most old systems with some MFC dependency set it at some point
 to retain binary compatibility.

 Here one of the error messages from Visual Studio 2013 (VC12) for
 reference (looks pretty much the same for VC14):
 {{{
 .\boost/log/detail/code_conversion.hpp(114) : error C2784:
 'boost::enable_if_c<boost::log::v2s_mt_nt5::aux::is_character_type<T>::value&&boost::log::v2s_mt_nt5::aux::is_character_type<TargetCharT>::value&&sizeof(SourceCharT)!=sizeof(TargetCharT),void>::type
 boost::log::v2s_mt_nt5::aux::code_convert(const SourceCharT
 *,size_t,std::basic_string<TargetCharT,TargetTraitsT,TargetAllocatorT>
 &,const std::locale &)' : could not deduce template argument for 'const
 SourceCharT *' from 'const std::wstring'
         .\boost/log/detail/code_conversion.hpp(93) : see declaration of
 'boost::log::v2s_mt_nt5::aux::code_convert'
 .\boost/log/detail/code_conversion.hpp(114) : error C2893: Failed to
 specialize function template
 'boost::enable_if_c<boost::log::v2s_mt_nt5::aux::is_character_type<T>::value&&boost::log::v2s_mt_nt5::aux::is_character_type<TargetCharT>::value&&sizeof(SourceCharT)!=sizeof(TargetCharT),void>::type
 boost::log::v2s_mt_nt5::aux::code_convert(const
 std::basic_string<_Elem,_Traits,_Alloc>
 &,std::basic_string<TargetCharT,TargetTraitsT,TargetAllocatorT> &,const
 std::locale &)'
         With the following template arguments:
         'SourceCharT=wchar_t'
         'SourceTraitsT=std::char_traits<wchar_t>'
         'SourceAllocatorT=std::allocator<wchar_t>'
         'TargetCharT=char'
         'TargetTraitsT=std::char_traits<char>'
         'TargetAllocatorT=std::allocator<char>'
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11541>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:18 UTC