incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Sebor (JIRA)" <>
Subject [jira] Commented: (STDCXX-519) [MSVC 7.1 fails to compile fmtflags_manip.cpp example
Date Mon, 13 Aug 2007 02:49:43 GMT


Martin Sebor commented on STDCXX-519:

You're right, we should try to avoid polluting the examples with kludges for broken compilers.
If there's a way to cleanly work around the compiler bug by rewriting the code using some
intuitive syntax that should be an acceptable solution.

As for (2), IMO, neither of the two solutions would be ideal but I would consider std::ios_base::fmtflags(-1)
a cleaner workaround than std::ios_base::fmtflags(0) because there's no simpler way to write
the former while there is a simple way to write the latter: std::ios_base::fmtflags(), or
in a ctor initializer list, simply "()."

Regarding (3), if the typedef helps, it would be my preference. Typedefs are often introduced
for complicated/complex types for convenience. I suppose std::ios_base::fmtflags could be
considered such a "complicated" type if the convenience typedef makes the code easier to read.
For example, typedef std::ios_base::fmtflags fmtflags would be a good choice (IMO).

It's your call :)

> [MSVC 7.1 fails to compile fmtflags_manip.cpp example
> -----------------------------------------------------
>                 Key: STDCXX-519
>                 URL:
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Examples
>         Environment: MSVC 7.1
>            Reporter: Farid Zaripov
>            Priority: Minor
> The compiler issues the errors:
> --------------
> Compiling...
> fmtflags_manip.cpp
> \stdcxx\trunk\examples\manual\fmtflags_manip.cpp(45) : error C2065: '__rw_fmtflags' :
undeclared identifier
> \stdcxx\trunk\examples\manual\fmtflags_manip.cpp(45) : error C2064: term does not evaluate
to a function taking 0 arguments
> --------------
> Created corresponding issue on Microsoft feedback page:

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message