Disable init-list-lifetime warning with tests in ArrayProxyNoTemporaries.cpp

This commit is contained in:
asuessenbach 2022-03-02 16:26:09 +01:00
parent 9cdca0a90d
commit bde88d1c87

View File

@ -15,13 +15,20 @@
// VulkanHpp Samples : ArrayProxyNoTemporaries // VulkanHpp Samples : ArrayProxyNoTemporaries
// Compile test on using vk::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 "vulkan/vulkan.hpp"
#include <iostream> #include <iostream>
static char const * AppName = "ArrayProxyNoTemporaries";
static char const * EngineName = "Vulkan.hpp";
void fct( vk::ArrayProxyNoTemporaries<int> /*ap*/ ) {} void fct( vk::ArrayProxyNoTemporaries<int> /*ap*/ ) {}
void fctc( vk::ArrayProxyNoTemporaries<const int> /*ap*/ ) {} void fctc( vk::ArrayProxyNoTemporaries<const int> /*ap*/ ) {}