Skip to content

CWG3036 [basic.extended.fp] std::float16_t may be an alias for a const type #710

Description

@eisenwave

Reference (section label): [basic.extended.fp]

Issue description

"Extended floating-point types" ([basic.fundamental]) includes cv-qualified types, and it is not clearly specified that std::float16_t and other type aliases shall name cv-unqualified types because std::float16_t is simply stated to "name such [an extended floating-point] type".

Suggested resolution

Change [basic.extended.fp] paragraph 1 as follows:

 If the implementation supports an extended floating-point type ([basic.fundamental])
 whose properties are specified by the ISO/IEC 60559 floating-point interchange format binary16,
 then the typedef-name std​::​float16_t is declared in the header <stdfloat> and names such a
+cv-unqualified ([basic.type.qualifier])
 type, the macro __STDCPP_FLOAT16_T__ is defined ([cpp.predefined]),
 and the floating-point literal suffixes f16 and F16 are supported ([lex.fcon]).

Change paragraphs 2, 3, 4, and 5 analogously.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions