Introduce raii-compliant handle wrapper classes.

This commit is contained in:
asuessenbach
2021-02-17 10:49:59 +01:00
parent 8dc12ba963
commit 2cb1c19c7f
165 changed files with 32669 additions and 2892 deletions

View File

@@ -16,7 +16,7 @@
// Compile test on using std::hash on handles
#if defined( _MSC_VER )
# pragma warning( disable : 4189 ) // local variable is initialized but not referenced
# pragma warning( disable : 4189 ) // local variable is initialized but not referenced
#elif defined( __GNUC__ )
# pragma GCC diagnostic ignored "-Wunused-variable"
#else
@@ -40,7 +40,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::UniqueInstance instance = vk::createInstanceUnique( vk::InstanceCreateInfo( {}, &appInfo ) );
auto h1 = std::hash<vk::Instance>{}( *instance );
auto h2 = std::hash<VkInstance>{}( *instance );
auto h2 = std::hash<VkInstance>{}( static_cast<VkInstance>( *instance ) );
assert( h1 == h2 );
std::unordered_set<vk::Instance> uset;