stdcxx-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Sebor (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (STDCXX-1055) some of the localization class declarations do not follow the ISO/IEC:14882:2003 specification
Date Tue, 07 Feb 2012 00:22:59 GMT

    [ https://issues.apache.org/jira/browse/STDCXX-1055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13201864#comment-13201864
] 

Martin Sebor commented on STDCXX-1055:
--------------------------------------

For (3), the standard allows implementations to add non-virtual member functions to library
classes (see 17.4.4.4 Member functions), but not virtual ones.

For (2), only declarations that are detectable by a conforming program matter for conformance.
I agree that exposing additional declarations is detrimental to portability but it isn't a
conformance defect.

The facet dtors were declared protected because facets weren't intended or envisioned to be
used on their own. They were intended to be used only with the locale class they are installed
in. Having a public dtor makes it possible to easily define an automatic object of the class
without having to derive from it. Some of the stdcxx faces can be used on their own as an
extension. I think there may be tests and perhaps even examples that take advantage of this
feature. 

If we don't think the feature is useful I'm not opposed to declaring the derived facet dtors
protected, but it has to be done without breaking compatibility. It can be done in 4.3 provided
it was protected by a macro. It can be made the default (without a macro) in 5.0 which is
expected to break compatibility.
                
> some of the localization class declarations do not follow the ISO/IEC:14882:2003 specification
> ----------------------------------------------------------------------------------------------
>
>                 Key: STDCXX-1055
>                 URL: https://issues.apache.org/jira/browse/STDCXX-1055
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 22. Localization
>    Affects Versions: 4.2.1, 4.2.2, 4.2.x, 4.3.x, 5.0.0
>         Environment: Solaris 10 and 11, Linux (RedHat and OpenSUSE), Sun C++ Compiler
12.1, 12.2, 12.3, GCC4.
> The defect is independent of platform or compiler.
>            Reporter: Stefan Teleman
>              Labels: conformance, standards
>             Fix For: 4.2.x, 4.3.x, 5.0.0
>
>         Attachments: stdcxx-1055.patch
>
>
> For the following classes:
> std::codecvt<> and its specializations
> std::collate<> and its specializations
> std::ctype<> and its specializations
> std::ctype_byname<> and its specializations
> std::messages<> and its specializations
> std::messages_byname<> and its specializations
> std::money_get<> and its specializations
> std::moneypunct<> and is specializations
> std::moneypunct_byname<> and its specializations
> std::money_put<> and its specializations
> std::num_get<> and its specializations
> std::numpunct<> and its specializations
> std::numpunct_byname<> and its specializations
> std::num_put<> and its specializations
> std::time_get<> and its specializations
> std::time_get_byname<> and its specializations
> std::time_put<> and its specializations
> 1. all these type declarations must be of class type (and not of struct type)
> 2. all these classes must have protected virtual destructors
> 3. all the corresponding *_base (time_base, money_base, etc), must have virtual destructors
> The current implementation of these types as structs (with default public access
> specifier on their non-virtual destructors) causes failures in Perennial CPPVS V8.1.
> Changing the access specifier for these destructors requires some changes in the
> stdcxx tests for localization.
> Patch based on 4.2.1 to follow shortly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message