poly: suppress warnings for unused variables

This commit is contained in:
Michele Caini
2020-12-29 18:15:33 +01:00
parent 820d52428f
commit e5841cd467
2 changed files with 2 additions and 1 deletions

1
TODO
View File

@@ -18,6 +18,7 @@
- ...
WIP:
* HP: test, enable warnings for unused variables
* HP: headless (sparse set only) view
* HP: pass the registry to pools, basic poly storage should have only component member
* HP: make view pack work also with groups, make packs input iterator only, add view adapter for external sources

View File

@@ -79,7 +79,7 @@ class poly_vtable {
template<typename Type, auto Candidate, typename Ret, typename Any, typename... Args>
static void fill_vtable_entry(Ret(* &entry)(Any &, Args...)) {
entry = +[](Any &any, Args... args) -> Ret {
entry = +[]([[maybe_unused]] Any &any, Args... args) -> Ret {
if constexpr(std::is_invocable_r_v<Ret, decltype(Candidate), Args...>) {
return std::invoke(Candidate, std::forward<Args>(args)...);
} else {