Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make gcc happy about dangling pointer
GCC is emitting a warning about a possible danling pointer on table like definitions: warning: possibly dangling reference to a temporary [-Wdangling-reference] 660 | auto const& table = get_current_events_table(state_indexes{}); | ^~~~~ Which I think that really comes from the use of state_indexes{} as argument: note: the temporary was destroyed at the end of the full expression 660 | auto const& table = get_current_events_table(state_indexes{}); | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ Clang is quiet about this and make me think that is a false positive since the metaprogramming code is using just the type of the state_indexes as much as I can see. Signed-off-by: Jose Luis Rivero <[email protected]>
- Loading branch information