> -----Original Message-----
> From: Martin Sebor [mailto:sebor@roguewave.com]
> Sent: Friday, October 26, 2007 2:59 AM
> To: stdcxx-dev@incubator.apache.org
> Subject: RE: ios_bits.cpp and MSVC
>
>
>
> Farid Zaripov-2 wrote:
> >
> > [...]
> >> http://issues.apache.org/jira/browse/STDCXX-613
> >
> > This bug avoided in _defs.h:
> >
> > _defs.h, line 1020:
> > -----------
> > # ifndef _RWSTD_NO_STATIC_CONST_MEMBER_DEFINITION
> > # define _RWSTD_DEFINE_STATIC_CONST(decl) decl
> > # else // if defined (_RWSTD_NO_STATIC_CONST_MEMBER_DEFINITION)
> > // disable defintion of static const integral members
> > // to work around compiler bugs such as those in MSVC
> > // or Intel C++/Windows that cause multiple definition
> > // linker errors (see PR #26562 and #30260)
> > # define _RWSTD_DEFINE_STATIC_CONST(ignore) /* empty */
> > # endif // _RWSTD_NO_STATIC_CONST_MEMBER_DEFINITION
> > -----------
> >
> > I've commented the #if !defined (_MSC_VER) || (_MSC_VER
> <= 1300) and
> > corresponding #endif lines in ios_bits.cpp, and the test
> shows no any
> > errors.
> >
> >
>
> I assume you couldn't find anything in the ChangeLog?
Correct.
> I'll have to check the Perforce log at Rogue Wave to see if I can
> find any clues as to why the conditional is there when I'm
> back in the office (I'm out sick today and possibly
> tomorrow). But if you've tested the code after removing it
> (I'd do several different build types just to be sure) and
> didn't see problems I'd say it should be a safe change to make.
This definitely can't cause any problem because of the lines from
_defs.h above and the following lines from _config-msvcrt.h (see below)
the _RWSTD_DEFINE_STATIC_CONST macro always #defined to
/* empty */ on all MSVC and ICC/Windows.
_config-msvcrt.h:
---------------
#ifndef _RWSTD_NO_STATIC_CONST_MEMBER_DEFINITION
// both MSVC 7.x and Intel C++/Windows allow "inline" initializers
// for static const integral data members but out-of-line
definitions
// cause multiply defined symbol errors (see PR #26562 and #30260)
// disable their definitions in source files (the members are still
// declared)
# define _RWSTD_NO_STATIC_CONST_MEMBER_DEFINITION
#endif // _RWSTD_NO_STATIC_CONST_MEMBER_DEFINITION
---------------
Farid.
|