Merge pull request #1224 from asuessenbach/warning

Disable init-list-lifetime warning with tests in ArrayProxyNoTemporaries.cpp
This commit is contained in:
Andreas Süßenbach 2022-03-02 17:58:10 +01:00 committed by GitHub
commit 64f290be71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 <iostream>
static char const * AppName = "ArrayProxyNoTemporaries";
static char const * EngineName = "Vulkan.hpp";
void fct( vk::ArrayProxyNoTemporaries<int> /*ap*/ ) {}
void fctc( vk::ArrayProxyNoTemporaries<const int> /*ap*/ ) {}