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{})};
}

Reply via email to