#include <iostream>
using namespace std;
class Product
{
public :
Product( const char * name, int i) ;
Product( Product && rhs) = delete ;
Product( const Product & rhs) = delete ;
~Product( ) ;
private :
const char * m_name;
int m_i;
} ;
int main( ) {
auto p = Product{ "abc" ,123 } ;
return 0 ;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY2xhc3MgUHJvZHVjdAp7CnB1YmxpYzoKCVByb2R1Y3QoY29uc3QgY2hhciAqbmFtZSwgaW50IGkpOwoJUHJvZHVjdChQcm9kdWN0ICYmcmhzKSA9IGRlbGV0ZTsKCVByb2R1Y3QoY29uc3QgUHJvZHVjdCAmcmhzKSA9IGRlbGV0ZTsKCX5Qcm9kdWN0KCk7CnByaXZhdGU6Cgljb25zdCBjaGFyICptX25hbWU7CglpbnQgbV9pOwp9OwoKaW50IG1haW4oKSB7CglhdXRvIHAgPSBQcm9kdWN0eyJhYmMiLDEyM307CglyZXR1cm4gMDsKfQ==
compilation info
prog.cpp: In function 'int main()':
prog.cpp:17:28: error: use of deleted function 'Product::Product(Product&&)'
auto p = Product{"abc",123};
^
prog.cpp:8:2: note: declared here
Product(Product &&rhs) = delete;
^
stdout