Opened 13 years ago

Closed 13 years ago

#3422 closed Bugs (fixed)

Bad workaround for BOOST_NO_STDC_NAMESPACE in codecvt_null.hpp

Reported by: Andrey Semashev Owned by: Robert Ramey
Milestone: Boost 1.41.0 Component: serialization
Version: Boost 1.40.0 Severity: Problem
Keywords: codecvt_null msvc stlport Cc:

Description

I'm trying to compile the 1.40 version of the library with MSVC 7.1 & STLPort 5.1.4 and having these errors:

boost\archive\codecvt_null.hpp(30) : error C2039: 'codecvt' : is not a member of 'operator``global namespace'''
boost\archive\codecvt_null.hpp(30) : error C2873: 'codecvt' : symbol cannot be used in a using-declaration

The problem is twofold.

  1. There is namespace std opening missing after the #if defined(BOOST_NO_STDC_NAMESPACE) condition. Likewise, the closing brace should be before the matching #endif.
  2. Since STLPort does import codecvt into its namespace (which aliases std), the !defined(UNDER_CE) condition is needless and causes my problems. I don't know if there are any platforms with codecvt in the global namespace, but MSVC 7.1 with STLPort is not one of them.

I attached the patch with the both fixes.

Attachments (1)

codecvt_null.hpp.patch (817 bytes ) - added by Andrey Semashev 13 years ago.
The fix for archives/codecvt_null.hpp

Download all attachments as: .zip

Change History (2)

by Andrey Semashev, 13 years ago

Attachment: codecvt_null.hpp.patch added

The fix for archives/codecvt_null.hpp

comment:1 by Robert Ramey, 13 years ago

Resolution: fixed
Status: newclosed

fixed on my machine - assuming tests pass here, will migrate to trunk

Note: See TracTickets for help on using tickets.