[[hiding]] with non-attribute declarations
_N3225_.7.6.5 [dcl.attr.override]
Daveed Vandevoorde

Created on 2010-03-23.00:00:00 last changed 96 months ago


Date: 2011-03-15.00:00:00

[Voted into the WP at the March, 2011 meeting as part of paper N3272.]

Date: 2010-11-15.00:00:00

Additional note (November, 2010):

The injected-class-name can also hide a name from a base class but cannot be annotated with new.

Date: 2010-11-15.00:00:00

Notes from the November, 2010 meeting:

Paper N3206 did not address these cases; in fact, it introduced additional member declarations that cannot be annotated as hiding a base class member (function-definitions and template-declarations), because the new virt-specifier applies to a member-declarator and none of these member-declarations uses a member-declarator.

Date: 2010-10-15.00:00:00

Additional note (October, 2010):

alias-declarations should also be considered in this regard.

Date: 2010-03-23.00:00:00

There are some kinds of declarations that can appear in a derived class and hide names from a base class, but for which the syntax does not permit a [[hiding]] attribute. For example:

    struct B1 {
        int N;
        int M;
    struct B2 {
        int M;
    struct [[base_check]] D: B1, B2 {
        enum { N };    // hides B1::N but cannot take an attribute
        using B1::M;   // hides B2::M but cannot take an attribute
Date User Action Args
2014-03-03 00:00:00adminsetstatus: fdis -> c++11
2011-04-10 00:00:00adminsetmessages: + msg3278
2011-04-10 00:00:00adminsetstatus: open -> fdis
2010-11-29 00:00:00adminsetmessages: + msg3133
2010-11-29 00:00:00adminsetmessages: + msg3132
2010-10-18 00:00:00adminsetmessages: + msg3028
2010-03-23 00:00:00admincreate