https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83591
--- Comment #2 from Tony E Lewis <TonyELewis at hotmail dot com> --- Further, even adding: #pragma GCC diagnostic ignored "-Wduplicated-branches" ...doesn't appear to stop these warnings in this example code, though it does correctly silence the warning in non-template functions.