cplusplus / cplusplus/draft

[class.dtor] p1 Make the requirement of a prospective destructor to be accurate.

Open
#5,421 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

[class.dtor] p1 says

A prospective destructor shall take no arguments ([dcl.fct]).

[dcl.fct] p4 says

If the parameter-declaration-clause is empty, the function takes no arguments.

Taking no arguments does not mean the parameter-declaration-clause is empty. I think

The parameter-declaration-clause of a prospective destructor shall be empty

is the intent here.

struct A{
   ~A(void){} // ok
};

A parameter list consisting of a single unnamed parameter of non-dependent type void is equivalent to an empty parameter list.

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

Search the draft source for [class.dtor] p1 and read the referenced [dcl.fct] p4 wording. Update the prospective-destructor requirement to express the intended empty parameter-declaration-clause, then verify that the void-parameter example remains consistent with the revised text.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.