From stdcxx-dev-return-1596-apmail-incubator-stdcxx-dev-archive=incubator.apache.org@incubator.apache.org Wed Jun 28 17:53:07 2006 Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 62536 invoked from network); 28 Jun 2006 17:53:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Jun 2006 17:53:06 -0000 Received: (qmail 19369 invoked by uid 500); 28 Jun 2006 17:53:06 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 19314 invoked by uid 500); 28 Jun 2006 17:53:06 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 19302 invoked by uid 99); 28 Jun 2006 17:53:06 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Jun 2006 10:53:06 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Jun 2006 10:53:05 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D382E7141F3 for ; Wed, 28 Jun 2006 17:51:29 +0000 (GMT) Message-ID: <26712958.1151517089863.JavaMail.jira@brutus> Date: Wed, 28 Jun 2006 17:51:29 +0000 (GMT+00:00) From: "Martin Sebor (JIRA)" To: stdcxx-dev@incubator.apache.org Subject: [jira] Created: (STDCXX-212) [MSVC 6.0] std::has_facet, std::use_facet broken MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [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 // for boolalpha #include // for cout, endl #include // for has_facet() #include // 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 is contained in the locale imbued in cout std::cout << std::boolalpha << std::has_facet >(std::cout.getloc ()) << std::endl; // see if my_facet is contained in the locale imbued in cout std::cout << std::has_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