私は持っている:
MyClass myObject1( var1, var2 );
myObject1.someMethod(); //> Changes the interal state of the object
myObject1
ある時点で、 type の「クリーンな」オブジェクトに割り当てたいと思いますMyClass
。何かのようなもの:
myObject1 = MyClass( otherVar1, otherVar2 );
ポインター (および/またはunique_ptr
) を使用せずに、高速で効率的な方法はありますか?