[Bug c++/89429] ICE with __func__
vakevk at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Feb 21 08:11:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89429
--- Comment #2 from Valentin <vakevk at gmail dot com> ---
Comment on attachment 45782
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45782
Example code
template <typename Function>
void f(Function&& function) {
// `0` is not special. Can be any value of any type.
function(0);
}
// No error when this template parameter is removed.
template<typename T>
void g() {
// Must be `auto`.
f([](auto) {
__func__;
});
}
void h() {
// `int` is not special. Can be any type.
g<int>();
}
More information about the Gcc-bugs
mailing list