From bde88d1c87d40cf8fd8058af30d67c7f1141996e Mon Sep 17 00:00:00 2001 From: asuessenbach Date: Wed, 2 Mar 2022 16:26:09 +0100 Subject: [PATCH] Disable init-list-lifetime warning with tests in ArrayProxyNoTemporaries.cpp --- .../ArrayProxyNoTemporaries.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp b/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp index 1cd91ab..508af1f 100644 --- a/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp +++ b/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp @@ -15,13 +15,20 @@ // VulkanHpp Samples : ArrayProxyNoTemporaries // Compile test on using vk::ArrayProxyNoTemporaries +#if defined( _MSC_VER ) +// no need to ignore any warnings with MSVC +#elif defined( __GNUC__ ) +# if ( 9 <= __GNUC__ ) +# pragma GCC diagnostic ignored "-Winit-list-lifetime" +# endif +#else +// unknow compiler... just ignore the warnings for yourselves ;) +#endif + #include "vulkan/vulkan.hpp" #include -static char const * AppName = "ArrayProxyNoTemporaries"; -static char const * EngineName = "Vulkan.hpp"; - void fct( vk::ArrayProxyNoTemporaries /*ap*/ ) {} void fctc( vk::ArrayProxyNoTemporaries /*ap*/ ) {}