Container::swap() implementation

Discussion in 'C++' started by Alex, Apr 12, 2009.

  1. Alex

    Alex New Member

    Joined:
    Oct 1, 2006
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    0
    Hi,
    I stumbled upon a interesting problem: given a container -- how to
    implement it's swap(C& o) member function and swap(C& c1, C& c2)
    function correctly. The trick is that I have no idea whether container
    member variable(s) have swap() defined for it (in which case I would
    like to use it via Koenig lookup) or not (in which case I'd like to
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice