Add support for std::tie on ResultValues. This allows developers to write (#39)
vk::Result result; vk::Image image; std::tie(result, image) = device.createImage(...); when using the non-exception mode.
This commit is contained in:
committed by
Andreas Süßenbach
parent
d2423209f8
commit
1ba3ceaf3f
@@ -319,6 +319,8 @@ std::string const resultValueHeader = (
|
||||
"\n"
|
||||
" Result result;\n"
|
||||
" T value;\n"
|
||||
"\n"
|
||||
" operator std::tuple<Result&, T&>() { return std::tuple<Result&, T&>(result, value); }\n"
|
||||
" };\n"
|
||||
"\n"
|
||||
" template <typename T>\n"
|
||||
@@ -3106,6 +3108,7 @@ int main( int argc, char **argv )
|
||||
<< "#include <initializer_list>" << std::endl
|
||||
<< "#include <string>" << std::endl
|
||||
<< "#include <system_error>" << std::endl
|
||||
<< "#include <tuple>" << std::endl
|
||||
<< "#include <type_traits>" << std::endl
|
||||
<< "#include <vulkan/vulkan.h>" << std::endl
|
||||
<< "#ifndef VULKAN_HPP_DISABLE_ENHANCED_MODE" << std::endl
|
||||
|
||||
Reference in New Issue
Block a user