[libcxx] [test] Avoid Clang's -Wunused-const-variable in is_constructible.pass.cpp.
authorStephan T. Lavavej <stl@exchange.microsoft.com>
Wed, 12 Apr 2017 17:16:38 +0000 (17:16 +0000)
committerStephan T. Lavavej <stl@exchange.microsoft.com>
Wed, 12 Apr 2017 17:16:38 +0000 (17:16 +0000)
This happens when using Clang with MSVC's STL, so there are no actual uses of this variable.

Fixes D31966.

llvm-svn: 300079

libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp

index f6ae401..9d2ec5e 100644 (file)
@@ -251,6 +251,7 @@ int main()
     LIBCPP_STATIC_ASSERT(
         clang_disallows_valid_static_cast_bug !=
         std::__libcpp_is_constructible<int&&, ExplicitTo<int&&>>::value, "");
+    ((void)clang_disallows_valid_static_cast_bug); // Prevent unused warning
 #else
     static_assert(clang_disallows_valid_static_cast_bug == false, "");
     LIBCPP_STATIC_ASSERT(std::__libcpp_is_constructible<int&&, ExplicitTo<int&&>>::value, "");