Opened 11 years ago

Closed 11 years ago

#6400 closed Bugs (fixed)

gcc3.4.4(cygwin) code will not compile if macro BOOST_LCAST_NO_WCHAR_T is defined

Reported by: grzechu81@… Owned by: nasonov
Milestone: Boost 1.49.0 Component: lexical_cast
Version: Boost 1.48.0 Severity: Showstopper
Keywords: gcc.3.4.4 cygwin BOOST_LCAST_NO_WCHAR_T Cc: antoshkka@…

Description

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.

Change History (2)

comment:1 by Grzegorz Wolszczak <grzechu81@…>, 11 years ago

Summary: code will not compile if macro BOOST_LCAST_NO_WCHAR_T is definedgcc3.4.4(cygwin) code will not compile if macro BOOST_LCAST_NO_WCHAR_T is defined

comment:2 by Antony Polukhin, 11 years ago

Cc: antoshkka@… added
Milestone: To Be DeterminedBoost 1.49.0
Resolution: fixed
Status: newclosed

Thanks for reporting an issue. It is already fixed in trunk. This bug is a duplicate for #6127

Note: See TracTickets for help on using tickets.