Skip to content

P1467R9: Extended floating-point types and standard names #105196

Description

@ldionne

Activity

  1. added
    libc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
    wg21-paperIssues representing the implementation of a WG21 paper
    on Aug 20, 2024
  2. piotrrak commented on Jan 13, 2026

    @piotrrak

    @philnik777 Hi I've just started working on this issue for both clang and libc++ parts, could you please assign me?

  3. piotrrak commented on Jan 16, 2026

    @piotrrak

    @philnik777 Hi I've just started working on this issue for both clang and libc++ parts, could you please assign me?

    Sorry about that, just found out that compiler project I've just joined was cancelled, thus I won't be able to work on that full time, as I've planned.

  4. johnplatts commented on Feb 10, 2026

    @johnplatts

    clang/lib/Frontend/InitPreprocessor.cpp needs to be updated to define the __STDCPP_FLOAT16_T__ macro in C++23 or later modes if _Float16 is available.

    In addition, the std::float16_t typedef needs to be added to <stdfloat> header if the __STDCPP_FLOAT16_T__ macro is defined.

    libstdc++ actually defines std::float16_t as a typedef for _Float16 in C++23 or later mode if the __STDCPP_FLOAT16_T__ macro is defined.

    Also need to implement std::numeric_limits<_Float16>, std::from_chars(const char*, const char*, _Float16&, std::chars_format), std::to_chars(char*, char*, _Float16, std::chars_format), std::to_chars(char*, char*, _Float16, std::chars_format, int), and the functions in <cmath> for _Float16 in C++23 and later modes if the _Float16 type is available.

    Also need to add support for std::formatter<_Float16, CharT> in C++23 and later modes.

  5. rybkr commented on Mar 24, 2026

    @rybkr

    @philnik777 I'm interested in taking a libc++-only part of this, at least initially:

    • Add a <stdfloat> header in libc++ that exposes the aliases when the corresponding __STDCPP_FLOAT* macros are available
    • Remove <stdfloat> from headers_not_available in header_information.py and regenerate module inputs
    • Add some libc++ tests for header availability

    I would not touch Clang predefined macros or __cpp_lib_stdfloat in this patch. Is this a reasonable decomposition?

  6. frederick-vs-ja commented on Mar 27, 2026

    @frederick-vs-ja
    Contributor

    Also need to implement std::numeric_limits<_Float16>, std::from_chars(const char*, const char*, _Float16&, std::chars_format), std::to_chars(char*, char*, _Float16, std::chars_format), std::to_chars(char*, char*, _Float16, std::chars_format, int), and the functions in <cmath> for _Float16 in C++23 and later modes if the _Float16 type is available.

    Also need to add support for std::formatter<_Float16, CharT> in C++23 and later modes.

    I think it's conforming to backport all additions except for new typedef names.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    c++23libc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.wg21-paperIssues representing the implementation of a WG21 paper

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions