mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-23 10:07:41 +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:
@@ -39,6 +39,9 @@ int main()
|
||||
A a;
|
||||
const A ca = A();
|
||||
|
||||
((void)a); // Prevent unused warning
|
||||
((void)ca); // Prevent unused warning
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
static_assert(sizeof(test(std::forward<A&>(a))) == 1, "");
|
||||
static_assert(sizeof(test(std::forward<A>(a))) == 4, "");
|
||||
|
Reference in New Issue
Block a user