id summary reporter owner description type status milestone component version severity resolution keywords cc 5793 "[date_time] format_date_parser::parse_date does not compile with ""Treat wchar_t as builtin type"" set to No" Daniel Mitchell Antony Polukhin "Testing with Boost 1.47, though it reproduces with trunk as of 19/aug/2011. Visual Studio 2008 / 2010; the following code does not compile when built with ""treat wchar_t as builtin type=no"" set in project settings: {{{ #include #include void parseDate() { std::locale locale; boost::date_time::format_date_parser parser(L"""", locale); boost::date_time::special_values_parser svp; boost::gregorian::date date = parser.parse_date(L"""", L"""", svp); } }}} The compile error is: {{{ c:\source\boost\trunk\boost\lexical_cast.hpp(1406): error C2535: 'bool boost::detail::lexical_stream_limited_src::operator >>(unsigned short &)' : member function already defined or declared with [ CharT=char_type, Traits=traits, RequiresStringbuffer=false ] c:\source\boost\trunk\boost\lexical_cast.hpp(1392) : see declaration of 'boost::detail::lexical_stream_limited_src::operator >>' with [ CharT=char_type, Traits=traits, RequiresStringbuffer=false ] c:\source\boost\trunk\boost\lexical_cast.hpp(1687) : see reference to class template instantiation 'boost::detail::lexical_stream_limited_src' being compiled with [ CharT=char_type, Traits=traits, RequiresStringbuffer=false ] c:\source\boost\trunk\boost\lexical_cast.hpp(1653) : while compiling class template member function 'short boost::detail::lexical_cast_do_cast::lexical_cast_impl(const Source &)' with [ Target=short, Source=src ] c:\source\boost\trunk\boost\lexical_cast.hpp(1858) : see reference to class template instantiation 'boost::detail::lexical_cast_do_cast' being compiled with [ Target=short, Source=src ] c:\source\boost\trunk\boost\date_time\format_date_parser.hpp(72) : see reference to function template instantiation 'Target boost::lexical_cast>(const Source &)' being compiled with [ Target=short, int_type=short, _Elem=wchar_t, _Traits=std::char_traits, _Ax=std::allocator, Source=std::basic_string,std::allocator> ] c:\source\boost\trunk\boost\date_time\format_date_parser.hpp(365) : see reference to function template instantiation 'int_type boost::date_time::fixed_string_to_int(std::istreambuf_iterator<_Elem,_Traits> &,std::istreambuf_iterator<_Elem,_Traits> &,boost::date_time::parse_match_result &,unsigned int,const charT &)' being compiled with [ int_type=short, charT=wchar_t, _Elem=wchar_t, _Traits=std::char_traits ] c:\source\boost\trunk\boost\date_time\format_date_parser.hpp(254) : while compiling class template member function 'boost::gregorian::date boost::date_time::format_date_parser::parse_date(std::istreambuf_iterator<_Elem,_Traits> &,std::istreambuf_iterator<_Elem,_Traits> &,std::basic_string<_Elem,_Traits,_Ax>,const boost::date_time::special_values_parser &) const' with [ date_type=boost::gregorian::date, charT=wchar_t, _Elem=wchar_t, _Traits=std::char_traits, _Ax=std::allocator ] c:\source\dan\boost_wchar_t_test\boost_wchar_t_test\boost_wchar_t_test.cpp(9) : see reference to class template instantiation 'boost::date_time::format_date_parser' being compiled with [ date_type=boost::gregorian::date, charT=wchar_t ] }}} If I set ""Treat wchar_t as builtin type"" to Yes, then it does compile correctly." Bugs closed To Be Determined lexical_cast Boost 1.47.0 Problem fixed antoshkka@…