
22 Apr
2011
22 Apr
'11
3:43 p.m.
On 4/22/2011 1:00 AM, Ilya Sokolov wrote:
Then the following code is not exception-safe:
void foo(shifted_ptr<int> a, shifted_ptr<int> b);
void bar() { foo(new shifted<int>(42), new shifted<int>(43)); }
due to unspecified order of arguments' evaluation.
I don't see how explicit constructors would change anything: void foo(shifted_ptr<int> a, shifted_ptr<int> b); void bar() { foo(shifted_ptr<int>(new shifted<int>(42)), shifted_ptr<int>(new shifted<int>(43))); } -Phil