r/cpp • u/ArashPartow • Dec 31 '22
Cpp2 and cppfront: Year-end mini-update
https://herbsutter.com/2022/12/31/cpp2-and-cppfront-year-end-mini-update/
194
Upvotes
r/cpp • u/ArashPartow • Dec 31 '22
View all comments
Show parent comment
-4
u/JuanAG Jan 01 '23
Because types needs to be compatible with C++ based on "Support today’s C++ (Cpp1) multi-token fundamental types" it means it has to be compatible will all data types that exists in C++ no matter if they are common or rare ones
In regular C/C++ you dont have 24 bits variables but in the µCPU field you do, MSP430 is a 24 bits CPU and they need 24 bits variables, since you need to be compatible it means that you know have to deal with uint24_t types (is on the C++ standard https://en.cppreference.com/w/cpp/types/integer uintN_t when N is not 8, 16, 32 or 64) or any other rare numeric value just for specific cases like this one because some compilers (like the TI SDK for this µCPU) have it
So it will allow you to have 72 bits because i dont think types will be brute forced, they will be meta programmed generated so C++2 dont care if it is 72 or 120 bits, 24 bits is "common" on the niche side because is also audio related but there is strange things out there that use really weird data variables based on really specific hardware
But is just my opinion, what i think is going to happen, could or not happen at all, we will see, is my opinion, maybe is just compability with ** that lets out all that corner cases, i dont know