
----- Original Message -----
From: Yakov Galka <ybungalobill@gmail.com> To: boost@lists.boost.org Cc: Sent: Saturday, September 15, 2012 11:54 AM Subject: Re: [boost] [nowide] Library looks for a review manager
On Sat, Sep 15, 2012 at 9:47 AM, Artyom Beilis <artyomtnk@yahoo.com> wrote:
From: Jookia <166291@gmail.com> > After reading the documentation the only question I really have is if there's a way to have it as a drop-in replacement. Surely 'using namespace boost::nowide' would conflict with STL definitions.
[...]
> I can see why
this may not be desirable as it can lead to weird bugs, like the ineffectiveness of sync_with_stdio.
See, the idea is to keep the API as familiar as possible such that simple mechanical conversion can be done, similarly to boost::shared_ptr -> std::shared_ptr, boost::function -> std::function etc.
I agree with Jookia here. Although the std::remove/std::iofstream etc. are not a big deal, it will be great if there is a simple way to set the std::cout/cin/cerr to use the same stream buffers as the nowide::* counterparts. It can be something as simple as changing boost::nowide::args a(argc,argv); to boost::nowide::args_and_ios a(argc,argv); .
Actually it is **very good idea** as indeed can easily switch stream buffers cin/cout/cerr/clog there. (It is important to revert them back before exiting main and such a scoped args would do the job well. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.com/ CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/
Cheers, Yakov
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost