Opened 6 years ago

Closed 6 years ago

#12260 closed Bugs (fixed)

Bug: time_fmt does not support for wchar_t on windows

Reported by: l_ting@… Owned by: viboes
Milestone: Boost 1.62.0 Component: chrono
Version: Boost 1.59.0 Severity: Problem
Keywords: Cc:

Description

chrono time_fmt does not support wchar_t on Windows platform. The reason is:

In the constructor of ios_base_data_aux, the time_fmt and duration_fmt has been initialized as char_t which causes the visual studio to report errors. These initialization is unnecessary. As a result, comment these two lines of initialization resolves the issue.

ios_base_data_aux() :

time_fmt(""), duration_fmt("")

{}


1>c:\home\svn\commonlibs\3rdparty\boost-v1.59.0\include\boost-1_59\boost\chrono\io\ios_base_state.hpp(119) : error C2664: 'std::basic_string<_Elem,_Traits,_Ax>::basic_string(std::basic_string<_Elem,_Traits,_Ax>::_Has_debug_it)' : cannot convert parameter 1 from 'const char [1]' to 'std::basic_string<_Elem,_Traits,_Ax>::_Has_debug_it' 1> with 1> [ 1> _Elem=wchar_t, 1> _Traits=std::char_traits<wchar_t>, 1> _Ax=std::allocator<wchar_t> 1> ] 1> Constructor for struct 'std::basic_string<_Elem,_Traits,_Ax>::_Has_debug_it' is declared 'explicit' 1> with 1> [ 1> _Elem=wchar_t, 1> _Traits=std::char_traits<wchar_t>, 1> _Ax=std::allocator<wchar_t> 1> ]

Change History (3)

comment:1 by viboes, 6 years ago

Status: newassigned

comment:2 by viboes, 6 years ago

Milestone: To Be DeterminedBoost 1.62.0

comment:3 by viboes, 6 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.