Wrong template parameter in destructor
ricab opened this issue · comments
Ricardo Abreu commented
Originally posted by @jasonivey in #17 (comment)
There are two errors/warnings which seem to conflict:
- GCC 11 with C++20 enabled gives the error:
scope_guard/scope_guard.hpp:152:36: error: template-id not allowed for destructor 152 | sg::detail::scope_guard<Callback>::~scope_guard<Callback>() noexcept | ^
- Clang 12/13/14 triggers the warning
-Wdtor-name
:Note: this was (incorrectly) fixed with pull request #10 right before the last releasewarning: ISO C++ requires the name after ‘::~’ to be found in the same scope as the name before ‘::~’