1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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