[Boost-bugs] [Boost C++ Libraries] #9220: Allow using widechar along with narrowchar without creating separated streams

Subject: [Boost-bugs] [Boost C++ Libraries] #9220: Allow using widechar along with narrowchar without creating separated streams
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-10-10 10:35:32


#9220: Allow using widechar along with narrowchar without creating separated
streams
----------------------------------------+---------------------
 Reporter: mntmnt7@… | Owner: andysem
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: log
  Version: Boost 1.54.0 | Severity: Problem
 Keywords: log wchar_t wstring string |
----------------------------------------+---------------------
 It would be so nice to have a possibility to put wide-char objects along
 with narrow-char objects into Logging streams without creating separated
 versions like "logger"/"wlogger" for each type.

 If I use both types simultaneously, I mean std::string and std::wstring,
 and I want to report everything into my log-file then I have a mess. I
 need EITHER to create separate logging-objects for each type OR convert
 one type into another.

 For example, Google-test library allows mix wchar and char output for
 custom error message for ASSERT:


 {{{
 ASSERT_TRUE(false) << L"wide-message" << "narrow-message";
 ASSERT_FALSE(true) << std::wstring(L"message") << std::string("message");

 }}}
 And it is so convenient!

 Any stream operator overloading is not an option. If library claims to be
 convenient, it should not require some magic non-documented workarounds.


 Thanks!

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9220>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:14 UTC