id summary reporter owner description type status milestone component version severity resolution keywords cc 13231 u32regex_replace() for std::u32string (UTF-32) won't compile robic@… John Maddock "Note - This pertains to input UTF-32 strings. Compiler: VS2015 , VC++ Boost version: 1.64 The u32regex_search() works fine and as expected ================================= Problem description: Intellisence detects proper input\\ parameters using the u32string parameter, but throws many\\ errors when compiling. The errors start with\\ >boost_1_64_0\boost/functional/hash/extensions.hpp(262): error C2664: 'size_t boost::hash_value(std::type_index)': cannot convert argument 1 from 'const char32_t' to 'std::type_index'\\ and end with\\ > RxReplace.cpp(9255): note: see reference to function template instantiation 'std::basic_string,std::allocator> boost::u32regex_replace(const std::basic_string,std::allocator> &,const boost::u32regex &,const std::basic_string,std::allocator> &,boost::regex_constants::match_flag_type)' being compiled with about 20 errors in between. \\ I hope this is just a problem with extensions.hpp\\ and maybe there is a quick fix (or it has already been fixed).\\ I desperately need this to work with ''std::u32string'' types\\ as UnicodeString just won't cut it for my purposes. ''From the documentation:\\ u32regex_replace\\ \\ For each regex_replace algorithm defined by\\ , then defines an overloaded algorithm that takes the same arguments, but which is called u32regex_replace, and which will accept UTF-8, UTF-16 or UTF-32 encoded data, as well as an ICU UnicodeString as input. '' The code below reproduces the compile errors {{{ // rxconst.h // ============================== typedef std::u32string X_32string; typedef std::wstring X_string; typedef boost::u32regex U_X_regex; typedef boost::u32match X_u32match; typedef std::u32string::const_iterator U32SITR; #define U_MAKEREGEX(str,options) make_u32regex(str,options) #define U_REGEX_SEARCH boost::u32regex_search #define U_REGEX_REPLACE boost::u32regex_replace // RxReplace.cpp ( won't compile ) // ============================== #include ""rxconst.h""; U_X_regex uRx = U_MAKEREGEX( _T(""[trgt]+""), regex_constants::perl ); X_32string sTarget, sFmt, sOutput; WstrToU32string( X_string(_T(""target"")), sTarget ); WstrToU32string( X_string(_T("""")), sFmt ); sOutput = U_REGEX_REPLACE( sTarget, uRx, sFmt ); // <-- Won't compile // RxSearch.cpp ( compiles and runs as expected ) // ============================== #include ""rxconst.h""; U_X_regex uRx = U_MAKEREGEX( _T(""[abce]+""), regex_constants::perl ); X_32string sSrc; WstrToU32string( X_string(_T(""source"")), sSrc ); U32SITR SitrStart = sSrc.begin(); U32SITR start = SitrStart; U32SITR end = sSrc.end(); X_u32match _M; while ( U_REGEX_SEARCH( start, end, _M, uRx, Flags, SitrStart ) ) { // ... } }}} " Bugs new To Be Determined regex Boost 1.64.0 Showstopper