Skip to content

Commit

Permalink
Workaround for Microsoft Visual Studio 2022 Internal compiler error.
Browse files Browse the repository at this point in the history
D:\a\fmt\fmt\test\compile-test.cc(362,3): fatal error C1001: Internal compiler error. [D:\a\fmt\build\test\compile-test.vcxproj]
(compiler file 'D:\a\_work\1\s\src\vctools\Compiler\CxxFE\sl\p1\c\constexpr\constexpr.cpp', line 8635)

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
  • Loading branch information
phprus authored and vitaut committed Jul 4, 2022
1 parent 115e00e commit 8311322
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/compile-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,14 @@ TEST(compile_test, compile_format_string_literal) {
}
#endif

#if FMT_CPLUSPLUS >= 202002L || \
// MSVS 2019 19.29.30145.0 - Support C++20 and OK.
// MSVS 2022 19.32.31332.0 - compile-test.cc(362,3): fatal error C1001: Internal
// compiler error.
// (compiler file
// 'D:\a\_work\1\s\src\vctools\Compiler\CxxFE\sl\p1\c\constexpr\constexpr.cpp',
// line 8635)
#if ((FMT_CPLUSPLUS >= 202002L) && \
(!FMT_MSC_VERSION || FMT_MSC_VERSION < 1930)) || \
(FMT_CPLUSPLUS >= 201709L && FMT_GCC_VERSION >= 1002)
template <size_t max_string_length, typename Char = char> struct test_string {
template <typename T> constexpr bool operator==(const T& rhs) const noexcept {
Expand Down

0 comments on commit 8311322

Please sign in to comment.