CPP 1.3 NO IDEA Avatar
  1. OMG Issue

CPP13 — Servant_var + spec typo?

  • Key: CPP13-75
  • Legacy Issue Number: 12913
  • Status: closed  
  • Source: lmco.com ( Abdullah Sowayan)
  • 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;
    }

  • Reported: CPP 1.2 — Mon, 6 Oct 2008 04:00 GMT
  • Disposition: Resolved — CPP 1.3
  • Disposition Summary:

    Update assignment operator as proposed

  • Updated: Fri, 6 Mar 2015 20:58 GMT