[ 
https://issues.apache.org/jira/browse/STDCXX-985?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Travis Vitek updated STDCXX-985:
--------------------------------

    Component/s:     (was: TR1.4 - Metaprogramming and Type Traits)
                 External
    Description: 
The {{__is_base_of()}} helper provided with gcc-4.3 doesn't detect protected 
and private inheritance as required by the draft standard. It appears that the 
helper may be based on an older version of the standard and needs to be 
updated. Here is a note from the description of the {{is_base_of}} trait.
{quote}[Note:Base classes that are private, protected, or ambigious are, 
nonetheless, base classes. —end note ]{quote}

This is the gcc description of the helper that they provide..
{quote}__is_base_of (base_type, derived_type)
If base_type is a base class of derived_type ([class.derived]) then the trait 
is true, otherwise it is false. Top-level cv qualifications of base_type and 
derived_type are ignored. For the purposes of this trait, a class type is 
considered is own base. Requires: if __is_class (base_type) and __is_class 
(derived_type) are true and base_type and derived_type are not the same type 
(disregarding cv-qualifiers), derived_type shall be a complete type. Diagnostic 
is produced if this requirement is not met.{quote}

Since there is no way to detect this from within the library, there isn't much 
we can do about fixing it.


  was:

The {{__is_base_of()}} helper provided with gcc-4.3 doesn't detect protected 
and private inheritance as required by the draft standard. It appears that the 
helper may be based on an older version of the standard and needs to be 
updated. Here is a note from the description of the {{is_base_of}} trait.
{quote}[Note:Base classes that are private, protected, or ambigious are, 
nonetheless, base classes. —end note ]{quote}

This is the gcc description of the helper that they provide..
{quote}__is_base_of (base_type, derived_type)
If base_type is a base class of derived_type ([class.derived]) then the trait 
is true, otherwise it is false. Top-level cv qualifications of base_type and 
derived_type are ignored. For the purposes of this trait, a class type is 
considered is own base. Requires: if __is_class (base_type) and __is_class 
(derived_type) are true and base_type and derived_type are not the same type 
(disregarding cv-qualifiers), derived_type shall be a complete type. Diagnostic 
is produced if this requirement is not met.{quote}

Since there is no way to detect this from within the library, there isn't much 
we can do about fixing it.


        Summary: [Linux/gcc] __is_base_of fails for private and protected 
inheritance  (was: [Linux/gcc] 20.meta.rel.cpp fails is_base_of assertions)

> [Linux/gcc] __is_base_of fails for private and protected inheritance
> --------------------------------------------------------------------
>
>                 Key: STDCXX-985
>                 URL: https://issues.apache.org/jira/browse/STDCXX-985
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: External
>    Affects Versions: 4.3
>         Environment: gcc-4.3
>            Reporter: Travis Vitek
>             Fix For: 4.3
>
>
> The {{__is_base_of()}} helper provided with gcc-4.3 doesn't detect protected 
> and private inheritance as required by the draft standard. It appears that 
> the helper may be based on an older version of the standard and needs to be 
> updated. Here is a note from the description of the {{is_base_of}} trait.
> {quote}[Note:Base classes that are private, protected, or ambigious are, 
> nonetheless, base classes. —end note ]{quote}
> This is the gcc description of the helper that they provide..
> {quote}__is_base_of (base_type, derived_type)
> If base_type is a base class of derived_type ([class.derived]) then the trait 
> is true, otherwise it is false. Top-level cv qualifications of base_type and 
> derived_type are ignored. For the purposes of this trait, a class type is 
> considered is own base. Requires: if __is_class (base_type) and __is_class 
> (derived_type) are true and base_type and derived_type are not the same type 
> (disregarding cv-qualifiers), derived_type shall be a complete type. 
> Diagnostic is produced if this requirement is not met.{quote}
> Since there is no way to detect this from within the library, there isn't 
> much we can do about fixing it.

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

Reply via email to