id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 6359,Intel Composer XE 2011 (12.0) fails to build Boost.Regex with ICU support,Brian Bassett ,John Maddock,"=== Environment === * Intel C++ Composer XE 2011 Update 8 for Windows (version 2011.8.278/12.1.2.278) * Boost 1.48.0 * ICU 4.8.1.1 (using binaries downloaded from http://download.icu-project.org/files/icu4c/4.8.1.1/icu4c-4_8_1_1-Win32-msvc10.zip) === Reproduce Steps === 1. Apply the attached patch (icubld.patch) in order to correctly have Boost.Build use the correct names for the ICU DLLs with the Intel toolset. 2. Unpack the Win32 ICU binary distribution to a temporary directory (i.e., `C:\tmp\icu`). 3. Start a command prompt with the Intel Composer XE 2011 environment (i.e., Start Menu -> All Programs -> Intel Parallel Studio XE 2011 -> Command Prompt -> Parallel Studio XE with Intel Compiler XE v12.1 Update 2 -> IA-32 Visual Studio 2010 mode) 4. Change directory into the Boost source tree and run: {{{ b2 --build-type=complete toolset=intel-12.0 address-model=32 -sICU_PATH=C:\tmp\icu stage }}} 5. Observe that building `libs/regex/src/icu.cpp` fails with the following error: {{{ .\boost/type_traits/is_convertible.hpp(264): error: a reference of type ""const boost::icu_regex_traits::char_type={UChar32={int32_t={signed int}}} *&"" (not const-qualified) cannot be initialized with a value of type ""ptrdiff_t={int} *"" BOOST_STATIC_CONSTANT(bool, value = ^ detected during: instantiation of class ""boost::detail::is_convertible_basic_impl [with From=ptrdiff_t={int} *&, To=const boost::icu_regex_traits::char_type={UChar32={int32_t={signed int}}} *&]"" at line 296 instantiation of class ""boost::detail::is_convertible_impl [with From=ptrdiff_t={int} *, To=const boost::icu_regex_traits::char_type={UChar32={int32_t={signed int}}} *&]"" at line 372 instantiation of class ""boost::detail::is_convertible_impl_dispatch [with From=ptrdiff_t={int} *, To=const boost::icu_regex_traits::char_type={UChar32={int32_t={signed int}}} *&]"" at line 419 instantiation of class ""boost::is_convertible [with From=ptrdiff_t={int} *, To=const boost::icu_regex_traits::char_type={UChar32={int32_t={signed int}}} *&]"" at line 183 of "".\boost/regex/v4/regex_format.hpp"" instantiation of ""int boost::re_detail::basic_regex_formatter::toi(ForwardIter &, ForwardIter, int) [with OutputIterator=boost::utf16_output_iterator, Results=boost::match_results, std::allocator>>>, traits=boost::regex_traits_wrapper, ForwardIter=ptrdiff_t={int} *]"" at line 543 of "".\boost/regex/v4/regex_format.hpp"" instantiation of ""void boost::re_detail::basic_regex_formatter::format_escape() [with OutputIterator=boost::utf16_output_iterator, Results=boost::match_results, std::allocator>>>, traits=boost::regex_traits_wrapper, ForwardIter=ptrdiff_t={int} *]"" at line 229 of "".\boost/regex/v4/regex_format.hpp"" instantiation of ""void boost::re_detail::basic_regex_formatter::format_all() [with OutputIterator=boost::utf16_output_iterator, Results=boost::match_results, std::allocator>>>, traits=boost::regex_traits_wrapper, ForwardIter=ptrdiff_t={int} *]"" at line 207 of "".\boost/regex/v4/regex_format.hpp"" instantiation of ""OutputIterator boost::re_detail::basic_regex_formatter::format(ForwardIter, ForwardIter, boost::regex_constants::match_flag_type={boost::regex_constants::match_flags={boost::regex_constants::_match_flags}}) [with OutputIterator=boost::utf16_output_iterator, Results=boost::match_results, std::allocator>>>, traits=boost::regex_traits_wrapper, ForwardIter=ptrdiff_t={int} *]"" at line 838 of "".\boost/regex/v4/regex_format.hpp"" instantiation of ""OutputIterator boost::re_detail::regex_format_imp(OutputIterator, const boost::match_results &, ForwardIter, ForwardIter, boost::regex_constants::match_flag_type={boost::regex_constants::match_flags={boost::regex_constants::_match_flags}}, const traits &) [with OutputIterator=boost::utf16_output_iterator, Iterator=boost::u16_to_u32_iterator, Alloc=std::allocator>>, ForwardIter=ptrdiff_t={int} *, traits=boost::regex_traits_wrapper]"" at line 851 of "".\boost/regex/icu.hpp"" instantiation of ""OutputIterator boost::re_detail::do_regex_replace(OutputIterator, const std::pair &, const boost::u32regex &, const std::pair &, boost::regex_constants::match_flag_type={boost::regex_constants::match_flags={boost::regex_constants::_match_flags}}) [with OutputIterator=boost::utf16_output_iterator, I1=boost::u16_to_u32_iterator, I2=boost::u16_to_u32_iterator]"" at line 1013 of "".\boost/regex/icu.hpp"" .\boost/regex/v4/regex_format.hpp(179): error: a reference of type ""const boost::icu_regex_traits::char_type={UChar32={int32_t={signed int}}} *&"" (not const-qualified) cannot be initialized with a value of type ""ptrdiff_t={int} *"" return m_traits.toi(i, j, base); ^ detected during: instantiation of ""int boost::re_detail::basic_regex_formatter::toi(ForwardIter &, ForwardIter, int, const boost::mpl::true_ &) [with OutputIterator=boost::utf16_output_iterator, Results=boost::match_results, std::allocator>>>, traits=boost::regex_traits_wrapper, ForwardIter=ptrdiff_t={int} *]"" at line 184 instantiation of ""int boost::re_detail::basic_regex_formatter::toi(ForwardIter &, ForwardIter, int) [with OutputIterator=boost::utf16_output_iterator, Results=boost::match_results, std::allocator>>>, traits=boost::regex_traits_wrapper, ForwardIter=ptrdiff_t={int} *]"" at line 543 instantiation of ""void boost::re_detail::basic_regex_formatter::format_escape() [with OutputIterator=boost::utf16_output_iterator, Results=boost::match_results, std::allocator>>>, traits=boost::regex_traits_wrapper, ForwardIter=ptrdiff_t={int} *]"" at line 229 instantiation of ""void boost::re_detail::basic_regex_formatter::format_all() [with OutputIterator=boost::utf16_output_iterator, Results=boost::match_results, std::allocator>>>, traits=boost::regex_traits_wrapper, ForwardIter=ptrdiff_t={int} *]"" at line 207 instantiation of ""OutputIterator boost::re_detail::basic_regex_formatter::format(ForwardIter, ForwardIter, boost::regex_constants::match_flag_type={boost::regex_constants::match_flags={boost::regex_constants::_match_flags}}) [with OutputIterator=boost::utf16_output_iterator, Results=boost::match_results, std::allocator>>>, traits=boost::regex_traits_wrapper, ForwardIter=ptrdiff_t={int} *]"" at line 838 instantiation of ""OutputIterator boost::re_detail::regex_format_imp(OutputIterator, const boost::match_results &, ForwardIter, ForwardIter, boost::regex_constants::match_flag_type={boost::regex_constants::match_flags={boost::regex_constants::_match_flags}}, const traits &) [with OutputIterator=boost::utf16_output_iterator, Iterator=boost::u16_to_u32_iterator, Alloc=std::allocator>>, ForwardIter=ptrdiff_t={int} *, traits=boost::regex_traits_wrapper]"" at line 851 of "".\boost/regex/icu.hpp"" instantiation of ""OutputIterator boost::re_detail::do_regex_replace(OutputIterator, const std::pair &, const boost::u32regex &, const std::pair &, boost::regex_constants::match_flag_type={boost::regex_constants::match_flags={boost::regex_constants::_match_flags}}) [with OutputIterator=boost::utf16_output_iterator, I1=boost::u16_to_u32_iterator, I2=boost::u16_to_u32_iterator]"" at line 1013 of "".\boost/regex/icu.hpp"" compilation aborted for libs\regex\build\..\src\icu.cpp (code 2) }}} Note that I've ommitted the remarks and warnings output by icl for clarity. === Additional Comments === Note that I've had no problems building this file on Linux using the same version of Intel's Linux compiler (2011.8.273), nor with earlier versions (11.1) of Intel's Windows compiler. This compiler (intel-win-12.0) is the only one I can trigger this compilation error. As such, I suspect this is actually a compiler bug with Intel. If it turns out to be such, please let me know and I can follow up with Intel directly. ",Bugs,closed,To Be Determined,regex,Boost 1.48.0,Regression,fixed,intel-win-12.0,