[Bug c++/109232] Using deduced return type in an unevaluated context leads to codegen
ppalka at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Mar 22 14:16:32 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109232
--- Comment #4 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Here's another perhaps simpler version that explicitly gives begin<R> internal
linkage, which also fails to link:
namespace {
template<class T>
auto begin(T&& r) {
return r.begin();
}
}
struct R {
int* begin();
};
static_assert(__is_same(decltype(begin(R())), int*));
int main() { }
More information about the Gcc-bugs
mailing list