mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-23 18:38:30 +08:00
Add some tests to verify that we implement LWG#2837 correctly. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294194 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -128,4 +128,11 @@ int main()
|
||||
assert((do_test<long, int>(non_cce)));
|
||||
assert((do_test<int, long long>(non_cce)));
|
||||
assert((do_test<long long, int>(non_cce)));
|
||||
|
||||
// LWG#2837
|
||||
{
|
||||
auto res = std::lcm((int64_t)1234, (int32_t)-2147483648);
|
||||
static_assert( std::is_same<decltype(res), std::common_type<int64_t, int32_t>::type>::value, "");
|
||||
assert(res == -1324997410816LL);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user