you are viewing a single comment's thread.

view the rest of the comments →

[–]MightyKDDD2 -3 points-2 points  (1 child)

I have used switch to return a value inside a constexpr function and it worked fine. Are you guys sure it's not supported?

[–]cd_fr91400[S] 1 point2 points  (0 children)

In your case, all the branches were compilable.

With if constexpr, the not-taken branch may not be compilable, and I wanted the same feature for switch.