Skip to content

Commit

Permalink
[ADT] OptionSet: ifdef out some code that seems to be crashing MSVC.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260654 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
akyrtzi committed Feb 12, 2016
1 parent 5dce6a8 commit 382c649
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/llvm/ADT/OptionSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ class OptionSet {
}

private:
#ifndef _MSC_VER
// This is crashing MSVC.
template <typename T>
static auto _checkResultTypeOperatorOr(T t) -> decltype(t | t) { return T(); }

Expand All @@ -124,6 +126,7 @@ class OptionSet {
static_assert(!std::is_same<decltype(_checkResultTypeOperatorOr(Flags())),
Flags>::value,
"operator| should produce an OptionSet");
#endif
};

}
Expand Down

0 comments on commit 382c649

Please sign in to comment.