https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119415
--- Comment #14 from 康桓瑋 <hewillk at gmail dot com> --- I believe the correct way should be: else if constexpr (ranges::common_range<_Rg> && requires { requires derived_from<typename iterator_traits<ranges::iterator_t<_Rg>>::iterator_category, input_iterator_tag>; } ) // ... But it isn't lovely to put it all in a single condition.