Date: Sun, 13 Apr 2025 10:07:44 +0000
x2
When classify things that are not integers as integers it completely loses its utility.
However, this is just 1 part of a bigger problem as the fundamental types in C++ are completely broken, and need to be completely re-done.
________________________________
From: Std-Proposals <std-proposals-bounces_at_[hidden]> on behalf of Howard Hinnant via Std-Proposals <std-proposals_at_[hidden]>
Sent: Saturday, April 12, 2025 7:08:18 PM
To: std-proposals_at_[hidden] <std-proposals_at_[hidden]>
Cc: Howard Hinnant <howard.hinnant_at_[hidden]>
Subject: Re: [std-proposals] std::arithmetic (concept)
Ancedote:
std::integral recently fell out of favor with me and I wrote my own concept that better suited my needs:
https://github.com/HowardHinnant/bbi/blob/master/bbi.h#L176-L191
StandardSignedInteger
StandardUnsignedInteger
StandardInteger
The difference here is that my concepts exclue bool and the character types. This distinction was at best not clear in C++11, and not modeled by the type_traits introduced then. For my work today, it is important to not include bool and the character types as “integral types” as their semantics are not consistent with the representaiton of integral numbers.
I mention this ancedote as a word of caution for building further concepts on top of type_traits. type_traits was a good model of the type system when they were introduced, but may not be today, 15 years later.
Howard
When classify things that are not integers as integers it completely loses its utility.
However, this is just 1 part of a bigger problem as the fundamental types in C++ are completely broken, and need to be completely re-done.
________________________________
From: Std-Proposals <std-proposals-bounces_at_[hidden]> on behalf of Howard Hinnant via Std-Proposals <std-proposals_at_[hidden]>
Sent: Saturday, April 12, 2025 7:08:18 PM
To: std-proposals_at_[hidden] <std-proposals_at_[hidden]>
Cc: Howard Hinnant <howard.hinnant_at_[hidden]>
Subject: Re: [std-proposals] std::arithmetic (concept)
Ancedote:
std::integral recently fell out of favor with me and I wrote my own concept that better suited my needs:
https://github.com/HowardHinnant/bbi/blob/master/bbi.h#L176-L191
StandardSignedInteger
StandardUnsignedInteger
StandardInteger
The difference here is that my concepts exclue bool and the character types. This distinction was at best not clear in C++11, and not modeled by the type_traits introduced then. For my work today, it is important to not include bool and the character types as “integral types” as their semantics are not consistent with the representaiton of integral numbers.
I mention this ancedote as a word of caution for building further concepts on top of type_traits. type_traits was a good model of the type system when they were introduced, but may not be today, 15 years later.
Howard
-- Std-Proposals mailing list Std-Proposals_at_[hidden] https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
Received on 2025-04-13 10:07:46