Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-05-24 04:51:27

Hi Janusz,

> In my cvs copy of utf8_codecvt_facet.hpp and utf8_codecvt_facet.cpp files
> there is CR+CR+LF used as line separator.

Fixed, thanks.

> Also, gcc 3.3.1 (mingw) claims:
> d:/sources/boost/libs/program_options/src/utf8_codecvt_facet.cpp: In member
> function `virtual std::codecvt_base::result
> boost::program_options::detail::utf8_codecvt_facet_wchar_t::do_out(mbstate_
>t &,
> const wchar_t*, const wchar_t*, const wchar_t*&, char*, char*, char*&)
> const
> ':
> d:/sources/boost/libs/program_options/src/utf8_codecvt_facet.cpp:229:
> warning: comparison
> is always false due to limited range of data type
> d:/sources/boost/libs/program_options/src/utf8_codecvt_facet.cpp: In
> function `
> int <unnamed>::get_cont_octet_out_count_impl(wchar_t) [with unsigned int
> s =
> 4]':
> d:/sources/boost/libs/program_options/src/utf8_codecvt_facet.cpp:445:
> warning: comparison
> is always true due to limited range of data type

There's something strange. I've only 346 lines in that file. Maybe you could
rerun the test, now that I've fixed CR-CR-LF issue and send the new line

> Also gcc 3.3.1 generates erros like:
> C:/CPP/MINGW/include/c++/3.3.1/bits/basic_ios.h: In instantiation of
> `std::basic_ios<wchar_t, std::char_traits<wchar_t> >':
> d:/sources/boost/libs/program_options/src/config_file.cpp:145:
> instantiated from `std::basic_istream<wchar_t, std::char_traits<wchar_t> >'
> d:/sources/boost/libs/program_options/src/config_file.cpp:145:
> instantiated from here
> C:/CPP/MINGW/include/c++/3.3.1/bits/basic_ios.h:67: error: no type named `
> pos_type' in `struct std::char_traits<wchar_t>'
> I found pos_type is defined for char_traits<wchar_t> specialization if
> _GLIBCPP_USE_WCHAR_T is set, but os_defines.h sets _GLIBCPP_USE_WSTRING
> only. Is it mingw related problem?

I think it's mingw related, since on Linux the library works on g++ 3.2, 3.3
and 3.4. Maybe, you can first check out with the mingw developers.

In the meantime, I've comitted the attached patch, which should avoid
declaring that specialization. Could you update and try again?

- Volodya

Boost list run by bdawes at, gregod at, cpdaniel at, john at