Using move semantics with multiple constructors
andrejtonev opened this issue · 1 comments
andrejtonev commented
Line 78 in ff01b02
If the T constructor is using move semantics, only the first object will receive the correct arguments.
andrejtonev commented
This goes beyond just the move semantics. Basically any passed argument that gets changed by the constructor will lead to constructor calls with different passed arguments.
One way to solve this would be to force constant references as input types.
In cases where the user needs move semantics or non-const references, they can create the objects independently of CAB and just pass their pointers.