copy-elision

    6ısı

    2cevap

    aşağıdaki programı ele alalım ctor kopyalayın: #include<iostream> using namespace std; struct S { S() = default; S(const S& other) = delete; S(S&& other) = delete; int i; };

    6ısı

    1cevap

    Ben GCC 7 bulundu garantili kopya elision uygulamıştır ve ben wandbox aşağıdaki kodu çalıştı: #include <iostream> struct NonMovable { NonMovable() noexcept = default; NonMovable(NonMovabl