Skip to content

[expr.throw#2] incorrectly dropping cv-qualifiers CWG2699 #3959

Closed
@JustAnotherHumanBeing

Description

@JustAnotherHumanBeing

This part of the C++ Standard says: Evaluating a throw-expression with an operand throws an exception; the type of the exception object is determined by removing any top-level cv-qualifiers from the static type of the operand and adjusting the type from “array of T” or function type T to “pointer to T” .
One might think that this passage implies that if we are dealing with the operand of type const char[3] , the const qualifier will be removed from it and then char[3] will be adjusted to type char* .

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