mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-23 01:18:52 +08:00
Void cast runtime-unused variables. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@268284 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -40,6 +40,16 @@ int main()
|
||||
|
||||
char* ns = 0;
|
||||
wchar_t* ws = 0;
|
||||
|
||||
((void)mb); // Prevent unused warning
|
||||
((void)s); // Prevent unused warning
|
||||
((void)tm); // Prevent unused warning
|
||||
((void)w); // Prevent unused warning
|
||||
((void)fp); // Prevent unused warning
|
||||
((void)va); // Prevent unused warning
|
||||
((void)ns); // Prevent unused warning
|
||||
((void)ws); // Prevent unused warning
|
||||
|
||||
static_assert((std::is_same<decltype(std::fwprintf(fp, L"")), int>::value), "");
|
||||
static_assert((std::is_same<decltype(std::fwscanf(fp, L"")), int>::value), "");
|
||||
static_assert((std::is_same<decltype(std::swprintf(ws, s, L"")), int>::value), "");
|
||||
|
Reference in New Issue
Block a user