summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/allocator.adaptor
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-05-02 19:15:48 +0000
committerEric Fiselier <eric@efcs.ca>2016-05-02 19:15:48 +0000
commitfb42f4c44adc1e2ac25c1305e77d53e735012b77 (patch)
tree1b7284c381b8626e94578527a76c00071d9f9bce /libcxx/test/std/utilities/allocator.adaptor
parent9d91336a839d291ea52e91401e9bd92f4dfc5b5a (diff)
downloadbcm5719-llvm-fb42f4c44adc1e2ac25c1305e77d53e735012b77.tar.gz
bcm5719-llvm-fb42f4c44adc1e2ac25c1305e77d53e735012b77.zip
Void cast runtime-unused variables. Patch from STL@microsoft.com
llvm-svn: 268284
Diffstat (limited to 'libcxx/test/std/utilities/allocator.adaptor')
-rw-r--r--libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/allocator_pointers.pass.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/allocator_pointers.pass.cpp b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/allocator_pointers.pass.cpp
index e165d9836db..bc5de61d801 100644
--- a/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/allocator_pointers.pass.cpp
+++ b/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/allocator_pointers.pass.cpp
@@ -37,7 +37,10 @@ void test_pointer()
{
typename std::allocator_traits<Alloc>::pointer vp;
typename std::allocator_traits<Alloc>::const_pointer cvp;
-
+
+ ((void)vp); // Prevent unused warning
+ ((void)cvp); // Prevent unused warning
+
static_assert(std::is_same<bool, decltype( vp == vp)>::value, "");
static_assert(std::is_same<bool, decltype( vp != vp)>::value, "");
static_assert(std::is_same<bool, decltype( vp > vp)>::value, "");
@@ -71,7 +74,10 @@ void test_void_pointer()
{
typename std::allocator_traits<Alloc>::void_pointer vp;
typename std::allocator_traits<Alloc>::const_void_pointer cvp;
-
+
+ ((void)vp); // Prevent unused warning
+ ((void)cvp); // Prevent unused warning
+
static_assert(std::is_same<bool, decltype( vp == vp)>::value, "");
static_assert(std::is_same<bool, decltype( vp != vp)>::value, "");
static_assert(std::is_same<bool, decltype( vp > vp)>::value, "");
OpenPOWER on IntegriCloud