Title
Extended floating-point types should not be cv-qualified
Status
open
Section
6.8.3 [basic.extended.fp]
Submitter
Jan Schultke

Created on 2025-06-03.00:00:00 last changed 1 month ago

Messages

Date: 2025-06-03.00:00:00

(From submission #710.)

It is underspecified whether std::float16_t and related extended floating-point types are cv-qualified or not. The intent is that those are cv-unqualified.

Possible resolution:

Change in 17.4.2 [stdfloat.syn] as follows:

  namespace std {
    #if defined(__STDCPP_FLOAT16_T__)
      using float16_t = implementation-defined decltype(0.0f16) ; // see 6.8.3 [basic.extended.fp]
    #endif
    #if defined(__STDCPP_FLOAT32_T__)
      using float32_t = implementation-defined decltype(0.0f32) ; // see 6.8.3 [basic.extended.fp]
    #endif
    #if defined(__STDCPP_FLOAT64_T__)
      using float64_t = implementation-defined decltype(0.0f64) ; // see 6.8.3 [basic.extended.fp]
    #endif
    #if defined(__STDCPP_FLOAT128_T__)
      using float128_t = implementation-defined decltype(0.0f128) ; // see 6.8.3 [basic.extended.fp]
    #endif
    #if defined(__STDCPP_BFLOAT16_T__)
      using bfloat16_t = implementation-defined decltype(0.0bf16) ; // see 6.8.3 [basic.extended.fp]
    #endif
  }
History
Date User Action Args
2025-06-03 00:00:00admincreate