You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Farid Zaripov (JIRA)" <ji...@apache.org> on 2007/08/12 22:09:43 UTC

[jira] Created: (STDCXX-519) [MSVC 7.1 fails to compile fmtflags_manip.cpp example

[MSVC 7.1 fails to compile fmtflags_manip.cpp example
-----------------------------------------------------

                 Key: STDCXX-519
                 URL: https://issues.apache.org/jira/browse/STDCXX-519
             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:
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=267488


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


[jira] Closed: (STDCXX-519) [MSVC 7.1 fails to compile fmtflags_manip.cpp example

Posted by "Farid Zaripov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Farid Zaripov closed STDCXX-519.
--------------------------------


> [MSVC 7.1 fails to compile fmtflags_manip.cpp example
> -----------------------------------------------------
>
>                 Key: STDCXX-519
>                 URL: https://issues.apache.org/jira/browse/STDCXX-519
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Examples
>         Environment: MSVC 7.1
>            Reporter: Farid Zaripov
>            Assignee: Farid Zaripov
>            Priority: Minor
>             Fix For: 4.2
>
>
> 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:
> https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=267488

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


[jira] Commented: (STDCXX-519) [MSVC 7.1 fails to compile fmtflags_manip.cpp example

Posted by "Farid Zaripov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STDCXX-519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12519354 ] 

Farid Zaripov commented on STDCXX-519:
--------------------------------------

1) Initialization the object to a value helps, but how about the thing that "example should be generic and there is no needs to workaround for one broken compiler"? :)
2) why saved_ (std::ios_base::fmtflags (-1)) but not saved_ (std::ios_base::fmtflags (0)), (the default initialization is zero initialization)?
3) typedef also helps.

> [MSVC 7.1 fails to compile fmtflags_manip.cpp example
> -----------------------------------------------------
>
>                 Key: STDCXX-519
>                 URL: https://issues.apache.org/jira/browse/STDCXX-519
>             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:
> https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=267488

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


[jira] Commented: (STDCXX-519) [MSVC 7.1 fails to compile fmtflags_manip.cpp example

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STDCXX-519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12519341 ] 

Martin Sebor commented on STDCXX-519:
-------------------------------------

Does initializing the object to a value help? (E.g., changing the ctor definition to fmtflags_manip (): strm_ (), saved_ (std::ios_base::fmtflags (-1)) { }) Or using a typedef for std::ios_base::fmtflags?

> [MSVC 7.1 fails to compile fmtflags_manip.cpp example
> -----------------------------------------------------
>
>                 Key: STDCXX-519
>                 URL: https://issues.apache.org/jira/browse/STDCXX-519
>             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:
> https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=267488

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


[jira] Assigned: (STDCXX-519) [MSVC 7.1 fails to compile fmtflags_manip.cpp example

Posted by "Farid Zaripov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Farid Zaripov reassigned STDCXX-519:
------------------------------------

    Assignee: Farid Zaripov

> [MSVC 7.1 fails to compile fmtflags_manip.cpp example
> -----------------------------------------------------
>
>                 Key: STDCXX-519
>                 URL: https://issues.apache.org/jira/browse/STDCXX-519
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Examples
>         Environment: MSVC 7.1
>            Reporter: Farid Zaripov
>            Assignee: 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:
> https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=267488

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


[jira] Commented: (STDCXX-519) [MSVC 7.1 fails to compile fmtflags_manip.cpp example

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STDCXX-519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12519361 ] 

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: https://issues.apache.org/jira/browse/STDCXX-519
>             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:
> https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=267488

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


[jira] Resolved: (STDCXX-519) [MSVC 7.1 fails to compile fmtflags_manip.cpp example

Posted by "Farid Zaripov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Farid Zaripov resolved STDCXX-519.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 4.2

I was wrong, the typedef doesn't helps.

Fixed thus: http://svn.apache.org/viewvc?view=rev&revision=565279

> [MSVC 7.1 fails to compile fmtflags_manip.cpp example
> -----------------------------------------------------
>
>                 Key: STDCXX-519
>                 URL: https://issues.apache.org/jira/browse/STDCXX-519
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Examples
>         Environment: MSVC 7.1
>            Reporter: Farid Zaripov
>            Assignee: Farid Zaripov
>            Priority: Minor
>             Fix For: 4.2
>
>
> 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:
> https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=267488

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