mirror of
https://github.com/darlinghq/darling-libcxx.git
synced 2024-11-26 21:30:42 +00:00
[libc++][test] Silence MSVC warning in std::optional test
`make_optional<string>(4, 'X')` passes `4` (an `int`) as the first argument to `string`'s `(size_t, charT)` constructor, triggering a signed/unsigned mismatch warning when compiling with MSVC at `/W4`. The incredibly simple fix is to instead use an unsigned literal (`4u`). git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@374684 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
437d5a5dcf
commit
1f4cad9f28
@ -40,7 +40,7 @@ int main(int, char**)
|
||||
assert(s == nullptr);
|
||||
}
|
||||
{
|
||||
auto opt = make_optional<std::string>(4, 'X');
|
||||
auto opt = make_optional<std::string>(4u, 'X');
|
||||
assert(*opt == "XXXX");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user