Skip to content

[format.arg] Declaration mismatch #3461

Description

@cpplearner

An exposition-only constructor of basic_format_arg is declared as

draft/source/utilities.tex

Lines 21583 to 21584 in 6deb181

template<class T>
explicit basic_format_arg(const T* p) noexcept; // \expos

in the class template definition, but const is missing in the description:

template<class T> explicit basic_format_arg(T* p) noexcept;

Activity

  1. jensmaurer commented on Nov 15, 2019

    @jensmaurer
    Member

    Given the definition of "value", it seems sufficiently obvious that the description is missing the "const" to fix this editorially.

  2. self-assigned this
    on Nov 15, 2019
  3. cpplearner commented on Apr 6, 2021

    @cpplearner
    ContributorAuthor

    Sorry, it seems that this constructor makes more sense without const. This constructor should be selected when the argument is of type void*. But if the parameter is const T* then template<class T> basic_format_arg(const T&) is a better match.

    Can we revert #3465 and make it a LWG issue?

  4. jensmaurer commented on Apr 6, 2021

    @jensmaurer
    Member

    What we did editorially is making the synopsis identical to the function definition. Sorry that this seemingly went the wrong way.

    Please feel free to have an LWG issue created, but reverting the editorial fix would re-introduce the inconsistency, which seems to make the situation worse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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