Work around GCC bug in constexpr function

llvm-svn: 337976
This commit is contained in:
Eric Fiselier 2018-07-25 22:21:47 +00:00
parent 7610b4d64c
commit 99ca3c0a61
1 changed files with 4 additions and 3 deletions

View File

@ -56,11 +56,12 @@ constexpr TestKind getFileTimeTestKind() {
using Rep = typename FileTimeT::rep; using Rep = typename FileTimeT::rep;
if (std::is_floating_point<Rep>::value) if (std::is_floating_point<Rep>::value)
return TK_FloatingPoint; return TK_FloatingPoint;
if (sizeof(Rep) == 16) else if (sizeof(Rep) == 16)
return TK_128Bit; return TK_128Bit;
if (sizeof(Rep) == 8) else if (sizeof(Rep) == 8)
return TK_64Bit; return TK_64Bit;
assert(false && "test kind not supported"); else
assert(false && "test kind not supported");
} }
template <class FileTimeT, class TimeT, class TimeSpecT, template <class FileTimeT, class TimeT, class TimeSpecT,