Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Created November 12, 2017 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deque-blog/b1bcce262e3da02102494c4e1fa1eef1 to your computer and use it in GitHub Desktop.
Save deque-blog/b1bcce262e3da02102494c4e1fa1eef1 to your computer and use it in GitHub Desktop.
class Trade
{
public:
Trade(Trade&& other)
: m_flows(std::move(other.m_flows))
{
for (auto& flow: m_flows) // O(N) complexity
flow.setTrade(this);
}
private:
std::vector<Flow> m_flows;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment