mirror of
https://github.com/mpusz/mp-units.git
synced 2025-07-29 18:07:16 +02:00
docs: MSVC compilation announced and its bugs listed on the compiler's conformance page
This commit is contained in:
@ -13,14 +13,29 @@
|
||||
The table below provides the minimum compiler version required to compile the code using a specific
|
||||
C++ feature:
|
||||
|
||||
| C++ Feature | C++ version | gcc | clang | apple-clang | MSVC |
|
||||
|-----------------------------------------------------------|:-----------:|:----:|:-----:|:-----------:|:----:|
|
||||
| **Minimum support** | 20 | 12 | 16 | 15 | None |
|
||||
| **`std::format`** | 20 | 13 | 17 | None | None |
|
||||
| **C++ modules** | 20 | None | 17 | None | None |
|
||||
| **`import std;`** | 23 | None | 18 | None | None |
|
||||
| **Static `constexpr` variables in `constexpr` functions** | 23 | 13 | 17 | None | None |
|
||||
| **Explicit `this` parameter** | 23 | 14 | 18 | None | None |
|
||||
| C++ Feature | C++ version | gcc | clang | apple-clang | MSVC |
|
||||
|-----------------------------------------------------------|:-----------:|:----:|:-----:|:-----------:|:-----------------------------------------:|
|
||||
| **Minimum support** | 20 | 12 | 16 | 15 | 194 :bug:{ title="BEWARE of MSVC Bugs!" } |
|
||||
| **`std::format`** | 20 | 13 | 17 | None | 194 |
|
||||
| **C++ modules** | 20 | None | 17 | None | None |
|
||||
| **`import std;`** | 23 | None | 18 | None | None |
|
||||
| **Static `constexpr` variables in `constexpr` functions** | 23 | 13 | 17 | None | None |
|
||||
| **Explicit `this` parameter** | 23 | 14 | 18 | None | None |
|
||||
|
||||
??? note "MSVC bugs"
|
||||
|
||||
MSVC still has a poor C++20 conformance. We had to make many workarounds to our codebase to
|
||||
make it compile on this compiler. Usage of such nasty preprocessor macros degrade the
|
||||
readability and maintainability of our code. This is why we've applied those patches to
|
||||
the main library code but not to unit tests and examples. Those still do not compile on MSVC.
|
||||
|
||||
Here is a list of the most important MSVC bugs:
|
||||
|
||||
- [Discrepancy in Behavior of operator*= and operator* for Multiplying int and double at compile time](https://developercommunity.visualstudio.com/t/Discrepancy-in-Behavior-of-operator-an/10732445)
|
||||
- [Syntax error when using non-type template parameters in templated class member function](https://developercommunity.visualstudio.com/t/Syntax-error-when-using-non-type-templat/10729428)
|
||||
- [Type always preferred over value when using qualified identifiers](https://developercommunity.visualstudio.com/t/Type-always-prefered-over-value-when-usi/10729382)
|
||||
|
||||
Please upvote them so they get a higher fixing priority at Microsoft.
|
||||
|
||||
!!! important
|
||||
|
||||
|
Reference in New Issue
Block a user