Introduce structure constructors using ArrayProxyNoTemporaries

This commit is contained in:
asuessenbach
2020-07-08 10:58:37 +02:00
parent d9a88324d8
commit d86303c0e4
57 changed files with 2229 additions and 604 deletions

View File

@@ -53,7 +53,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::DeviceQueueCreateInfo deviceQueueCreateInfo(
vk::DeviceQueueCreateFlags(), static_cast<uint32_t>( graphicsQueueFamilyIndex ), 1, &queuePriority );
vk::UniqueDevice device =
physicalDevice.createDeviceUnique( vk::DeviceCreateInfo( vk::DeviceCreateFlags(), 1, &deviceQueueCreateInfo ) );
physicalDevice.createDeviceUnique( vk::DeviceCreateInfo( vk::DeviceCreateFlags(), deviceQueueCreateInfo ) );
// Note: No need to explicitly destroy the device, as the corresponding destroy function is
// called by the destructor of the UniqueDevice on leaving this scope.
@@ -65,6 +65,11 @@ int main( int /*argc*/, char ** /*argv*/ )
std::cout << "vk::SystemError: " << err.what() << std::endl;
exit( -1 );
}
catch ( std::exception & err )
{
std::cout << "std::exception: " << err.what() << std::endl;
exit( -1 );
}
catch ( ... )
{
std::cout << "unknown error\n";