[Bug c++/93711] [9/10/11 Regression] ICE: [[no_unique_address] when constructing via template helper
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jun 24 18:45:58 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93711
--- Comment #6 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Another test:
struct istream_iterator {
istream_iterator() {}
istream_iterator(const istream_iterator&) {}
};
istream_iterator next(istream_iterator&& bound) {
return static_cast<istream_iterator>(bound);
}
struct copy_result {
[[no_unique_address]] istream_iterator in;
};
int main() {
copy_result result{next(istream_iterator{})};
}
More information about the Gcc-bugs
mailing list