PR libstdc++/79980 fix target type of cast

PR libstdc++/79980
	* src/c++11/codecvt.cc (to_integer(codecvt_mode)): Fix target type.

From-SVN: r246205
This commit is contained in:
Jonathan Wakely 2017-03-16 17:22:47 +00:00 committed by Jonathan Wakely
parent e711928b48
commit e363c939cb
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2017-03-16 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/79980
* src/c++11/codecvt.cc (to_integer(codecvt_mode)): Fix target type.
PR libstdc++/80041
* src/c++11/codecvt.cc (__codecvt_utf16_base<wchar_t>::do_out)
(__codecvt_utf16_base<wchar_t>::do_in): Convert char arguments to

View File

@ -34,7 +34,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// The standard doesn't define these operators, which is annoying.
static underlying_type<codecvt_mode>::type
to_integer(codecvt_mode m)
{ return static_cast<mode_t>(m); }
{ return static_cast<underlying_type<codecvt_mode>::type>(m); }
static codecvt_mode& operator&=(codecvt_mode& m, codecvt_mode n)
{ return m = codecvt_mode(to_integer(m) & to_integer(n)); }