cnjinhao / nana

a modern C++ GUI library
https://nana.acemind.cn
Boost Software License 1.0
2.29k stars 331 forks source link

return value in all cases #683

Closed crillion closed 5 months ago

crillion commented 6 months ago

Hi, I'm compiling nana with gcc 13.2 (from msys2 on windows) and std=c++23. Using the switch -Werror=return-type I force to errors the warnings of methods not returning a value through all paths (normally allowed for compatibility with C). So I get an error in the method on general_events.hpp :

template<typename Function>
event_handle connect_unignorable(Function && fn, bool in_front = false)

which had no return statement in the else branch. Honestly I'm not sure if I'm returning a right/meaningful value, but it then compiles and works normally. I've also fixed a tiny typo.