Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[basic.start.main] Clarify what it means to "use" main CWG2811 #6563

Copy link
Copy link
Closed
@Eisenwave

Description

@Eisenwave
Issue body actions

The current wording in [basic.start.main] p3 is:

The function main shall not be used within a program.

There is no forward reference for what "use" refers to and the word doesn't seem to be defined anywhere, so I'm pretty sure this is meant to mean odr-use:

A function is odr-used if it is named by a potentially-evaluated expression or conversion.

- [basic.def.odr] p8

  1. Can we just replace "use" with "odr-use"?
  2. Is CWG intent clear enough for this to be non-editorial or is there more to it?

C++98 Wording

The function main shall not be used (3.2 [basic.def.odr]) within a program.

- [basic.start.main] p3

An object or non-overloaded function is used if its name appears in a potentially-evaluated expression.

- [basic.def.odr] p2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.