diff --git a/tests/ResultValueRValue/ResultValueRValue.cpp b/tests/ResultValueRValue/ResultValueRValue.cpp index d3e89ea..9d7ecb6 100644 --- a/tests/ResultValueRValue/ResultValueRValue.cpp +++ b/tests/ResultValueRValue/ResultValueRValue.cpp @@ -20,19 +20,25 @@ VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE -template -struct Wrapper -{ - Wrapper( T && raw ) : raw{ raw } {} +#if defined(VULKAN_DISABLE_IMPLICIT_RESULT_VALUE_CAST) + static_assert(false, "Conversions not enabled"); +#endif - T raw; -}; +template void as_value(T) {} +template void as_cref(const T&) {} +template void as_rvref(T&&) {} void test() { auto device = vk::Device{}; - // We should be able to move created vk objects, regardless of the - // result type they were returned in. - Wrapper{ device.createImage( {} ) }; - Wrapper{ device.createGraphicsPipeline( {}, {} ) }; + + // just example: non-result values (vk::Image) + as_value(device.createImage({})); + as_cref(device.createImage({})); + as_rvref(device.createImage({})); + + // vk::ResultValue should also work + as_value(device.createGraphicsPipeline(nullptr, {})); + as_cref(device.createGraphicsPipeline(nullptr, {})); + as_rvref(device.createGraphicsPipeline(nullptr,{})); }