Subject: [Boost-bugs] [Boost C++ Libraries] #10448: MSVC bug with default argument passing - a workaround is required
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-09-03 12:50:26
#10448: MSVC bug with default argument passing - a workaround is required
----------------------+------------------------------
Reporter: merkin@⦠| Type: Support Requests
Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.56.0
Severity: Problem | Keywords:
----------------------+------------------------------
MSVC 2010-2013 for x64 may pass default values incorrectly.
I met this bug with such innocent code:
{{{
std::wcout << boost::filesystem::path(L"ABC");
}}}
and got hieroglyphs around ABC instead of quotation marks.
To workaround the bug: just add '''(Char)''' prior to default values in
the declaration of boost::io::detail::quote
(boost/io/detail/quoted_manip.hpp)
{{{
// manipulator for const std::basic_string&
template <class Char, class Traits, class Alloc>
detail::quoted_proxy<std::basic_string<Char, Traits, Alloc> const &,
Char>
quoted(const std::basic_string<Char, Traits, Alloc>& s,
Char escape=(Char)'\\', Char delim=(Char)'\"');
// manipulator for non-const std::basic_string&
template <class Char, class Traits, class Alloc>
detail::quoted_proxy<std::basic_string<Char, Traits, Alloc> &, Char>
quoted(std::basic_string<Char, Traits, Alloc>& s,
Char escape=(Char)'\\', Char delim=(Char)'\"');
// manipulator for const C-string*
template <class Char>
detail::quoted_proxy<const Char*, Char>
quoted(const Char* s, Char escape=(Char)'\\', Char
delim=(Char)'\"');
}}}
I did not scan other sources with similar problem; could you please check
them yourselves?
P.S. GODDAMN! Your tracker disallows me to tell you the detailed
description of the MSVC bug on its tracker. It treats the URL as spam.
Please combine the URL from these pieces:
{{{connect.microsoft.com /VisualStudio /feedbackdetail /view / 962812}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/10448> 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:16 UTC