Boost logo

Boost :

Subject: Re: [boost] [nowide] review
From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2017-06-20 09:20:10


2017-06-20 11:02 GMT+02:00 Artyom Beilis via Boost <boost_at_[hidden]>:

> >> Thank You very much for the review and the inputs.
> >>
> >> > One minor thing. In th be docs (http://cppcms.com/files/nowide/html/)
> we
> >> > read:
> >> > boost::nowide::widen
> >> > <http://cppcms.com/files/nowide/html/namespaceboost_1_1nowide.html#
> >> a6baacc1bb80c134a2ce37f13977b5500>
> >> > returns std::string.
> >> >
> >> > I thing is thsould be std::wstring?
> >> >
> >> > Regards,
> >> > &rzej;
> >> >
> >>
> >> Actually this version is for fixed user buffer - function without
> >> allocation. So it is right one. Another versions return std::wstring
> >>
> >
> > But when I look into the reference page:
> > http://cppcms.com/files/nowide/html/namespaceboost_1_1nowide.html#
> a6baacc1bb80c134a2ce37f13977b5500
> >
> > I cannot see any overload returning `std::string`?
> >
> > Regards,
> > &rzej;
>
>
> These:
>
> std::string narrow (wchar_t const *s)
> std::wstring widen (char const *s)
> std::string narrow (std::wstring const &s)
> std::wstring widen (std::string const &s)
>
> See: http://cppcms.com/files/nowide/html/namespaceboost_1_1nowide.html#
> a13b4f6f7f97f889ec858dde2d367b130
>
> Yes, I can see those. And what they say is that functions called `narrow`
return a `std::string`, and functions `widen` return a `std::wstring`, and
this makes perfect sense for me.

But the quoted tutorial says:

boost::nowide::widen
> <http://cppcms.com/files/nowide/html/namespaceboost_1_1nowide.html#a6baacc1bb80c134a2ce37f13977b5500>
> returns std::string.
>

It says something different than the declarations you have quoted.

Regards,
&rzej;


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk