'Does anyone know why MSVC 2022 hasn't std::byteswap?
Does anyone know why MSVC 2022 hasn't std::byteswap<>() ? I switched to C++20 compiling and everything I use from works - but not std::byteswap<>(). Am I missing here stomething to make this work ?
Solution 1:[1]
Because it is not part of C++20. It was only introduced in the current draft for C++23.
Even in a (pre-)C++23 mode, it shouldn't be expected that the compiler already implements all features of an unfinished standard revision and if it does implement them they should probably be considered experimental.
In this case, the latest MSVC has it available in /std:c++latest mode.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | user17732522 |
