[Bug c++/99686] ICE when using both concepts and full specialization

StevenSun2021 at hotmail dot com gcc-bugzilla@gcc.gnu.org
Wed May 5 00:33:34 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99686

--- Comment #6 from Steven Sun <StevenSun2021 at hotmail dot com> ---
While in C++20, the complier thinks it's unnecessary to instatiate a new
template. Just use the full specialization! Thus, this bug wouldn't exist at
first place.

Intuitively, I am in favor of the compiler's C++20 behavior -- use full
specialization anyway.

Clang 12 and MSVC latest also have this behavior (choose full specialization).


I don't know how to contribute to gcc. If anyone would like to fix this bug, my
recommendation would be:

Make the compiler in C++17 mode think it's unnecessary to instantiate a new
function when full specialzation is provided, which resulting the same behavior
as C++20 mode and as other compilers.


More information about the Gcc-bugs mailing list