You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Martin Sebor (JIRA)" <ji...@apache.org> on 2006/06/28 19:51:29 UTC

[jira] Created: (STDCXX-212) [MSVC 6.0] std::has_facet, std::use_facet broken

[MSVC 6.0] std::has_facet, std::use_facet broken
------------------------------------------------

         Key: STDCXX-212
         URL: http://issues.apache.org/jira/browse/STDCXX-212
     Project: C++ Standard Library
        Type: Bug

  Components: 22. Localization  
    Versions: 4.1.2, 4.1.3    
 Environment: MSVC 6.0
    Reporter: Martin Sebor


Moved from the Rogue Wave bug tracking database:

****Created By: sebor @ Jun 16, 2004 12:17:37 PM****
The example manual/hasfacet.cpp prints 'false\nfalse\n' when compiled with MSVC 6.0. This is due to the interaction of two bugs: PR #27947 and PR #28102 which prevents has_facet from using the workaround mentioned in PR #27947 (using the default argument). This effectively means that std::has_facet and std::use_facet are pretty much useless.

#include <ios>        // for boolalpha 
#include <iostream>   // for cout, endl
#include <locale>     // for has_facet()

#include <examples.h>


// dummy facet, must derive from locale::facet
// and define a static member of type locale::id
struct my_facet: public std::locale::facet
{
    static std::locale::id id;
};

std::locale::id my_facet::id;


int main ()
{
    // see if ctype<char> is contained in the locale imbued in cout
    std::cout << std::boolalpha
              << std::has_facet<std::ctype<char> >(std::cout.getloc ())
              << std::endl;
 
    // see if my_facet is contained in the locale imbued in cout
    std::cout << std::has_facet<my_facet>(std::cout.getloc ())
              << std::endl;

    return 0;
}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (STDCXX-212) [MSVC 6.0] std::has_facet, std::use_facet broken

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

Martin Sebor closed STDCXX-212.
-------------------------------

    Resolution: Won't Fix

MSVC 6.0 is so old and broken that it's not worth our effort to worry about it. In addition, more recent versions of the compiler handle the code fine so an easy solution is to upgrade.

> [MSVC 6.0] std::has_facet, std::use_facet broken
> ------------------------------------------------
>
>                 Key: STDCXX-212
>                 URL: https://issues.apache.org/jira/browse/STDCXX-212
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 22. Localization
>    Affects Versions: 4.1.3, 4.1.2
>         Environment: MSVC 6.0
>            Reporter: Martin Sebor
>            Priority: Minor
>
> Moved from the Rogue Wave bug tracking database:
> ****Created By: sebor @ Jun 16, 2004 12:17:37 PM****
> The example manual/hasfacet.cpp prints 'false\nfalse\n' when compiled with MSVC 6.0. This is due to the interaction of two bugs: PR #27947 and PR #28102 which prevents has_facet from using the workaround mentioned in PR #27947 (using the default argument). This effectively means that std::has_facet and std::use_facet are pretty much useless.
> #include <ios>        // for boolalpha 
> #include <iostream>   // for cout, endl
> #include <locale>     // for has_facet()
> #include <examples.h>
> // dummy facet, must derive from locale::facet
> // and define a static member of type locale::id
> struct my_facet: public std::locale::facet
> {
>     static std::locale::id id;
> };
> std::locale::id my_facet::id;
> int main ()
> {
>     // see if ctype<char> is contained in the locale imbued in cout
>     std::cout << std::boolalpha
>               << std::has_facet<std::ctype<char> >(std::cout.getloc ())
>               << std::endl;
>  
>     // see if my_facet is contained in the locale imbued in cout
>     std::cout << std::has_facet<my_facet>(std::cout.getloc ())
>               << std::endl;
>     return 0;
> }

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


[jira] Updated: (STDCXX-212) [MSVC 6.0] std::has_facet, std::use_facet broken

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

Martin Sebor updated STDCXX-212:
--------------------------------

    Priority: Minor  (was: Major)

Lowered priority since the problem can be dealt with by upgrading to MSVC 7.x and 8.0.

> [MSVC 6.0] std::has_facet, std::use_facet broken
> ------------------------------------------------
>
>                 Key: STDCXX-212
>                 URL: https://issues.apache.org/jira/browse/STDCXX-212
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 22. Localization
>    Affects Versions: 4.1.3, 4.1.2
>         Environment: MSVC 6.0
>            Reporter: Martin Sebor
>            Priority: Minor
>
> Moved from the Rogue Wave bug tracking database:
> ****Created By: sebor @ Jun 16, 2004 12:17:37 PM****
> The example manual/hasfacet.cpp prints 'false\nfalse\n' when compiled with MSVC 6.0. This is due to the interaction of two bugs: PR #27947 and PR #28102 which prevents has_facet from using the workaround mentioned in PR #27947 (using the default argument). This effectively means that std::has_facet and std::use_facet are pretty much useless.
> #include <ios>        // for boolalpha 
> #include <iostream>   // for cout, endl
> #include <locale>     // for has_facet()
> #include <examples.h>
> // dummy facet, must derive from locale::facet
> // and define a static member of type locale::id
> struct my_facet: public std::locale::facet
> {
>     static std::locale::id id;
> };
> std::locale::id my_facet::id;
> int main ()
> {
>     // see if ctype<char> is contained in the locale imbued in cout
>     std::cout << std::boolalpha
>               << std::has_facet<std::ctype<char> >(std::cout.getloc ())
>               << std::endl;
>  
>     // see if my_facet is contained in the locale imbued in cout
>     std::cout << std::has_facet<my_facet>(std::cout.getloc ())
>               << std::endl;
>     return 0;
> }

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