4 ms·
How many non-8-bit-char platforms are there with char8_t support, and how many do we expect in the future?
by dataflow 8mo ago
How many non-8-bit-char platforms are there with char8_t support, and how many do we expect in the future?
- dspwizard 8mo agoTI C2000 is one example
- dataflow 8mo agoThank you. I assume you're correct, though for some reason I can't find references claiming C++20 being supported with some cursory searches.
- RobotToaster 8mo agoMostly DSPs
- dataflow 8mo agoNon-8-bit-char DSPs would have char8_t support? Definitely not something I expected, links would be cool.
- j16sdiz 8mo agoWhy not? except it is same as `unsigned char` and can be larger than 8 bit ISO/IEC 9899:2024 section 7.30 > char8_t which is an unsigned integer type used for 8-bit characters and is the same type as unsigned char;
- dataflow 8mo ago> Why not? Because "it supports Unicode" is not an expected use case for a non-8-bit DSP? Do you have a link to a single one that does support it?
- kevin_thibedeau 8mo agoThe exact size types are never present on platforms that don't support them.
- LexiMax 8mo agoIs there a single esoteric DSP in active use that supports C++20? This is the umpteenth time I've seen DSP's brought up in casual conversations about C/C++ standards, so I did a little digging: Texas Instruments' compiler seems to be celebrating C++14 support: https://www.ti.com/tool/C6000-CGT https://www.ti.com/tool/C6000-CGT CrossCore Embedded Studio apparently supports C++11 if you pass a switch in requesting it, though this FAQ answer suggests the underlying standard library is still C++03: https://ez.analog.com/dsp/software-and-development-tools/cces/w/documents/5275/does-crosscore-embedded-studio-support-c-11 https://ez.analog.com/dsp/software-and-development-tools/cce... Everything I've found CodeWarrior related suggests that it is C++03-only: https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/dsc/2199/1/MCU_DSC_Compiler.pdf https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/... Aside from that, from what I can tell, those esoteric architectures are being phased out in lieu of running DSP workloads on Cortex-M, which is just ARM. I'd love it if someone who was more familiar with DSP workloads would chime in, but it really does seem that trying to be the language for all possible and potential architectures might not be the right play for C++ in 202x. Besides, it's not like those old standards or compilers are going anywhere.
- BoredomIsFun 8mo ago> but it really does seem that trying to be the language for all possible and potential architectures might not be the right play for C++ in 202x. Portability was always a selling point of C++. I'd personaly advise those who find it uncomfortable, to choose a different PL, perhaps Rust.
- LexiMax 8mo ago> Portability was always a selling point of C++. Judging by the lack of modern C++ in these crufty embedded compilers, maybe modern C++ is throwing too much good effort after bad. C++03 isn't going away, and it's not like these compilers always stuck to the standard anyway in terms of runtime type information, exceptions, and full template support. Besides, I would argue that the selling point of C++ wasn't portability per se, but the fact that it was largely compatible with existing C codebases. It was embrace, extend, extinguish in language form.