Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7157: [lexical_cast] convert volatile int to string cause Run-Time Check Failure #2
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-07-24 19:21:25
#7157: [lexical_cast] convert volatile int to string cause Run-Time Check Failure
#2
------------------------------------+---------------------------------------
Reporter: pavel.korzh@⦠| Owner: apolukhin
Type: Bugs | Status: new
Milestone: To Be Determined | Component: lexical_cast
Version: Boost 1.50.0 | Severity: Problem
Resolution: | Keywords:
------------------------------------+---------------------------------------
Comment (by anonymous):
Replying to [comment:1 apolukhin]:
> Could not reproduce it on MSVC2010. Can you attach more info about this
bug (backtrace, line number that triggers this error)
try it on MSVC2008. If you have this one.
compiler didn't find specialization for detail::lcast_src_length so
sizeof(buf) is 2 bytes:
{{{
std::size_t const src_len = lcast_src_length::value;
char_type buf[src_len + 1]; // src_len equal 1 here
}}}
fix:
{{{
< typedef BOOST_DEDUCED_TYPENAME
detail::array_to_pointer_decay<Source>::type src;
---
> typedef BOOST_DEDUCED_TYPENAME
detail::array_to_pointer_decay<boost::remove_cv<Source>::type>::type src;
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7157#comment:2> 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:10 UTC