cplusplus / cplusplus/draft

The range of the application of [namespace.udecl#11]

Open
#4,590 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cwg not-editorial
Dominant language
TeX
Stars
221
Forks
813
Avg merge
16h 4m
Merged PRs (30d)
36

Description

The set of declarations named by a using-declarator that inhabits a class C does not include member functions and member function templates of a base class that correspond to (and thus would conflict with) a declaration of a function or function template in C.

See the following example

struct Base{
    static void fun(){}
};
struct D:Base{
    using Base::fun;
    // decltype(fun()) a;  //#1
    // static auto fun()->decltype(fun()){return 0;}  //#2
    static int fun(){
        return 0;
    }
    decltype(fun()) a;  //#3
};

#1 and #2 are both ill-formed considered by the major implementations. Instead, #3 is ok. It seems that the bullet [namespace.udecl#11] does not uniformly apply to any case. It appears to me that the declarations named by using-declaration are being hidden from the point P which is immediately after the locus of the declarations that is declared in C.

Should we say

After a point P, the set of declarations named by a using-declarator that inhabits a class C does not include member functions and member function templates of a base class that correspond to (and thus would conflict with) a declaration of a function or function template in C where P is immediately after the locus of the declaration.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with [namespace.udecl#11] and the Base/D example in the issue, comparing the behavior of #1, #2, and #3 described there. Determine whether the clause needs a point-P qualification, with wording complete when it uniformly explains the reported cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.