Issue 12913: Servant_var + spec typo? (cxx_revision) Source: (Mr. Abdullah Sowayan, ) Nature: Uncategorized Issue Severity: Summary: I was looking at the OMG IDL to C++ mapping specification, specifically page 123 and came across the below. It looks to me that their implementation in the spec is NOT correct. Shouldn't the swap function take the "tmp" Servant_var? Servant_var& operator=(Servant* p) { if (_ptr != p) { Servant_var<Servant> tmp = p; swap(_ptr, p); } return *this; } Servant_var& operator=(const Servant_var& b) { if (_ptr != b._ptr) { Servant_var<Servant> tmp = b; swap(_ptr, b._ptr); } return *this; } Resolution: Update assignment operator as proposed Revised Text: Servant_var& operator=(const Servant_var& b) { if (_ptr != b._ptr) { Servant_var<Servant> tmp = b; swap(_ptr, b._ptr); } return *this; } Actions taken: October 6, 2008: received issue January 11, 2012: closed issue Discussion: End of Annotations:===== te: Mon, 06 Oct 2008 14:30:25 -0400 From: "Sowayan, Abdullah (N-DUA)" Subject: Servant_var + spec typo? To: issues@omg.org Thread-Topic: Servant_var + spec typo? thread-index: Ackn4ZXDV8DiXDJ/TjOGS2QlnERMtw== x-cr-puzzleid: {CF94D4A4-3146-463F-BDEA-4EC2B84210DB} x-cr-hashedpuzzle: AL/f AVfs Ab9t BvRC B2iP CKXw DsQu E21P FJy9 HPOj Hio0 IDRN IsPG JIBE KL7S Kbi/;1;aQBzAHMAdQBlAHMAQABvAG0AZwAuAG8AcgBnAA==;Sosha1_v1;7;{CF94D4A4-3146-463F-BDEA-4EC2B84210DB};YQBiAGQAdQBsAGwAYQBoAC4AcwBvAHcAYQB5AGEAbgBAAGwAbQBjAG8ALgBjAG8AbQA=;Mon, 06 Oct 2008 18:30:25 GMT;UwBlAHIAdgBhAG4AdABfAHYAYQByACAAKwAgAHMAcABlAGMAIAB0AHkAcABvAD8A X-MS-Has-Attach: X-MS-TNEF-Correlator: X-OriginalArrivalTime: 06 Oct 2008 18:30:29.0971 (UTC) FILETIME=[9C45BA30:01C927E1] Hi folks, I was looking at the OMG IDL to C++ mapping specification, specifically page 123 and came across the below. It looks to me that their implementation in the spec is NOT correct. Shouldn't the swap function take the "tmp" Servant_var? Servant_var& operator=(Servant* p) { if (_ptr != p) { Servant_var tmp = p; swap(_ptr, p); } return *this; } Servant_var& operator=(const Servant_var& b) { if (_ptr != b._ptr) { Servant_var tmp = b; swap(_ptr, b._ptr); } return *this; } Thanks, Abdul Sowayan Lockheed Martin