[Bug libstdc++/69600] [5 Regression] Incorrect use of copy-assignment instead of move assignment from function

sshannin at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Aug 27 15:18:38 GMT 2024


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69600

--- Comment #7 from sshannin at gmail dot com ---
Comment on attachment 37541
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37541
preprocessed source


> #include <map>
> #include <memory>
> #include <string>
>typedef std::unique_ptr<int> inner_value_t;
>typedef std::map<int, inner_value_t> inner_data_t;
>
>typedef std::map<std::string, inner_data_t> data_t;
>
>
>data_t foo() {
>    return data_t{};
>}
>
>int main(int argc, char **argv)
>{
>
>    data_t d;
>    d = foo();
>    return 0;
>}


More information about the Gcc-bugs mailing list