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

llvm-svn: 260654
This commit is contained in:
Argyrios Kyrtzidis 2016-02-12 04:36:48 +00:00
parent bbbbec0b54
commit 2329967714
1 changed files with 3 additions and 0 deletions

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
};
}