Subject: [Boost-bugs] [Boost C++ Libraries] #6441: lexical_cast uses non existing std::basic_stringstream<char>::pptr when compiling with -DBOOST_NO_STD_LOCALE
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-01-23 21:21:06
#6441: lexical_cast uses non existing std::basic_stringstream<char>::pptr when
compiling with -DBOOST_NO_STD_LOCALE
----------------------------------------+-----------------------------------
Reporter: leutloff@⦠| Owner: nasonov
Type: Bugs | Status: new
Milestone: To Be Determined | Component: lexical_cast
Version: Boost 1.48.0 | Severity: Regression
Keywords: |
----------------------------------------+-----------------------------------
BOOST_NO_STD_LOCALE is handled in this context:
{{{
#if defined(BOOST_NO_STRINGSTREAM)
typedef stl_buf_unlocker<std::strstream, CharT >
local_stringbuffer_t;
#elif defined(BOOST_NO_STD_LOCALE)
typedef stl_buf_unlocker<std::stringstream, CharT >
local_stringbuffer_t;
#else
typedef stl_buf_unlocker<std::basic_stringbuf<CharT, Traits>,
CharT > local_stringbuffer_t;
#endif
}}}
'''but''' the stl_buf_unlocker class is using missing methods (pptr,
pbase, setg, setp):
{{{
namespace detail // stl_buf_unlocker
{
template< class BufferType, class CharT >
class stl_buf_unlocker: public BufferType{
public:
typedef BufferType base_class;
#ifndef BOOST_NO_USING_TEMPLATE
using base_class::pptr;
using base_class::pbase;
using base_class::setg;
using base_class::setp;
#else
CharT* pptr() const { return base_class::pptr(); }
CharT* pbase() const { return base_class::pbase(); }
void setg(CharT* gbeg, CharT* gnext, CharT* gend){ return
base_class::setg(gbeg, gnext, gend); }
void setp(CharT* pbeg, CharT* pend) { return setp(pbeg, pend);
}
#endif
};
}
}}}
These are the errors from the compiler:
{{{
./boost/lexical_cast.hpp:1129:31: error: no members matching
âboost::detail::stl_buf_unlocker<std::basic_stringstream<char>,
char>::base_class {aka std::basic_stringstream<char>}::pptrâ in
âboost::detail::stl_buf_unlocker<std::basic_stringstream<char>,
char>::base_class {aka struct std::basic_stringstream<char>}â
./boost/lexical_cast.hpp:1130:31: error: no members matching
âboost::detail::stl_buf_unlocker<std::basic_stringstream<char>,
char>::base_class {aka std::basic_stringstream<char>}::pbaseâ in
âboost::detail::stl_buf_unlocker<std::basic_stringstream<char>,
char>::base_class {aka struct std::basic_stringstream<char>}â
./boost/lexical_cast.hpp:1131:31: error: no members matching
âboost::detail::stl_buf_unlocker<std::basic_stringstream<char>,
char>::base_class {aka std::basic_stringstream<char>}::setgâ in
âboost::detail::stl_buf_unlocker<std::basic_stringstream<char>,
char>::base_class {aka struct std::basic_stringstream<char>}â
./boost/lexical_cast.hpp:1132:31: error: no members matching
âboost::detail::stl_buf_unlocker<std::basic_stringstream<char>,
char>::base_class {aka std::basic_stringstream<char>}::setpâ in
âboost::detail::stl_buf_unlocker<std::basic_stringstream<char>,
char>::base_class {aka struct std::basic_stringstream<char>}â
}}}
Compiling Boost.Test results in some more errors around this problem. I
will attach the complete build log when building Boost.Test to show the
compiler flags, too.
The error is present in 1.48 and trunk. The log is from the trunk build.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6441> 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:08 UTC