[Boost-bugs] [Boost C++ Libraries] #6400: code will not compile if macro BOOST_LCAST_NO_WCHAR_T is defined

Subject: [Boost-bugs] [Boost C++ Libraries] #6400: code will not compile if macro BOOST_LCAST_NO_WCHAR_T is defined
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-01-14 15:25:20


#6400: code will not compile if macro BOOST_LCAST_NO_WCHAR_T is defined
-----------------------------------------------------+----------------------
 Reporter: grzechu81@… | Owner: nasonov
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: lexical_cast
  Version: Boost 1.48.0 | Severity: Showstopper
 Keywords: gcc.3.4.4 cygwin BOOST_LCAST_NO_WCHAR_T |
-----------------------------------------------------+----------------------
 Using compiler gcc 3.4.4 (cygwin) and boost 1.48.0
 following code:

 {{{
 #include <boost/lexical_cast.hpp>
 int main(int argc, char * argv[])
 {
     return 0;
 }
 }}}

 will result in compiler error:

 {{{
 .../boost_1_48_0/boost/lexical_cast.hpp: In function `bool
 boost::detail::parse_inf_nan_impl(const CharT*, const CharT*, T&, const
 CharT*, const CharT*, const CharT*, const CharT*, CharT, CharT)':
 .../boost_1_48_0/boost/lexical_cast.hpp:651: error: incomplete type
 `boost::detail::lcast_char_constants<wchar_t>' used in nested name
 specifier
 .../boost_1_48_0/boost/lexical_cast.hpp:652: error: incomplete type
 `boost::detail::lcast_char_constants<wchar_t>' used in nested name
 specifier
 }}}


 It is because if using this compiler, macro BOOST_NO_STD_WSTRING is
 defined , so.. lexical cast defines BOOST_LCAST_NO_WCHAR_T.

 Some code is #ifdef'ed with this macro but not all that should. So there
 is discrepancy.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6400>
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