Using the pattern explained here as follows:
auto action =
std::unique_ptr< posix_spawn_file_actions_t, decltype(&posix_spawn_file_actions_destroy) >
{ new posix_spawn_file_actions_t(), posix_spawn_file_actions_destroy };
triggers a [-Wignored-attributes]
in gcc v10.1.0
-std=c++20
:
warning: ignoring attributes on template argument ‘int (*)(posix_spawn_file_actions_t*) noexcept’
| std::unique_ptr<posix_spawn_file_actions_t, decltype(&posix_spawn_file_actions_destroy)>
| ^
Why is that? Should it be ignored or is there a way to adjust the code?