Implement LWG2350: min, max, and minmax should be constexpr.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@201697 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -43,4 +43,12 @@ int main()
|
||||
test(x, y, x);
|
||||
test(y, x, x);
|
||||
}
|
||||
#if _LIBCPP_STD_VER > 11
|
||||
{
|
||||
constexpr int x = 1;
|
||||
constexpr int y = 0;
|
||||
static_assert(std::max(x, y) == x, "" );
|
||||
static_assert(std::max(y, x) == x, "" );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user