[ADT] OptionSet: ifdef out some code that seems to be crashing MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260654 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Argyrios Kyrtzidis 2016-02-12 04:36:48 +00:00
parent 5dce6a869b
commit 382c6490fe

View File

@ -116,6 +116,8 @@ public:
}
private:
#ifndef _MSC_VER
// This is crashing MSVC.
template <typename T>
static auto _checkResultTypeOperatorOr(T t) -> decltype(t | t) { return T(); }
@ -124,6 +126,7 @@ private:
static_assert(!std::is_same<decltype(_checkResultTypeOperatorOr(Flags())),
Flags>::value,
"operator| should produce an OptionSet");
#endif
};
}