Your if constexprneeds the else otherwise the second return is always there. In this case, it's harmless, but it compiles in unreachable code that the compiler may warn about. The point of if constexpr is to not compile code on either the if or else.
You're correct, thank you for catching it, it's fixed now. I was mislead by the fact that I am returning there, which would be OK for a normal if, but yes, there should be an else in order not to compile that part of code that does not go into the true branch.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Your
if constexprneeds theelseotherwise the secondreturnis always there. In this case, it's harmless, but it compiles in unreachable code that the compiler may warn about. The point ofif constexpris to not compile code on either theiforelse.You're correct, thank you for catching it, it's fixed now. I was mislead by the fact that I am returning there, which would be OK for a normal if, but yes, there should be an else in order not to compile that part of code that does not go into the true branch.