Thanks for the tutorial. I'm starting to learn Vulkan :)
I turned on my personal -Wpedantic flag and improved some sentences regarding C++, also removed an unused header.
Rationale:
<functional> is not used anywhere. There's no such thing as a "lambda function" in C++ - we have lambda expressions which are a core language feature that does not require use of the <functional> header, and we have std::function which is a general-purpose callable object wrapper that supports closures generated by lambda expressions, but it is not directly related to them. std::function is a heavyweight abstraction and it is not the type of a closure generated by a lambda expression - the latter is an anonymous unique type generated by the compiler.
"Automatic resource management" is nothing new to modern C++, as it can be implemented through basic RAII usage by creating a struct with a simple constructor and destructor. While it is true that it is possible to use std::unique_ptr and std::shared_ptr for Vulkan object management, that is overkill unless unique or shared ownership semantics are actualy needed. The first choice should be a basic wrapper struct, as it has the least overhead and least flexibility.
Thanks for the tutorial. I'm starting to learn Vulkan :) I turned on my personal
-Wpedantic
flag and improved some sentences regarding C++, also removed an unused header.Rationale:
<functional>
is not used anywhere. There's no such thing as a "lambda function" in C++ - we have lambda expressions which are a core language feature that does not require use of the<functional>
header, and we havestd::function
which is a general-purpose callable object wrapper that supports closures generated by lambda expressions, but it is not directly related to them.std::function
is a heavyweight abstraction and it is not the type of a closure generated by a lambda expression - the latter is an anonymous unique type generated by the compiler."Automatic resource management" is nothing new to modern C++, as it can be implemented through basic RAII usage by creating a
struct
with a simple constructor and destructor. While it is true that it is possible to usestd::unique_ptr
andstd::shared_ptr
for Vulkan object management, that is overkill unless unique or shared ownership semantics are actualy needed. The first choice should be a basic wrapper struct, as it has the least overhead and least flexibility.