File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 29
29
#include " swift/AST/ReferencedNameTracker.h"
30
30
#include " swift/AST/PrettyStackTrace.h"
31
31
#include " swift/AST/PrintOptions.h"
32
- #include " swift/Basic/Compiler.h"
33
32
#include " swift/Basic/SourceManager.h"
34
33
#include " clang/Basic/Module.h"
35
34
#include " llvm/ADT/DenseMap.h"
@@ -842,10 +841,10 @@ namespace {
842
841
843
842
template <typename T>
844
843
struct OperatorLookup {
845
- // TODO: this assertion fails in MSVC, but not clang-cl.
846
- # if !SWIFT_COMPILER_IS_MSVC
847
- static_assert ( static_cast <T*>(nullptr ), "Only usable with operators" );
848
- # endif
844
+ // Don't fold this into the static_assert: this would trigger an MSVC bug
845
+ // that causes the assertion to fail.
846
+ static constexpr T* ptr = static_cast <T*>(nullptr );
847
+ static_assert (ptr, " Only usable with operators " );
849
848
};
850
849
851
850
template <>
You can’t perform that action at this time.
0 commit comments