[Bug c++/96761] "error: call of overloaded ‘func(size_t)’ is ambiguous" when argument is size_t(0) and func(int) and func(const char *) are visible
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Aug 24 12:04:32 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96761
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC treats size_t(0) in this case the same as 0UL (for arches where size_t is
unsigned long), while clang does not. With func(0UL); it is ambiguous in both
compilers.
More information about the Gcc-bugs
mailing list