Created
November 12, 2017 15:54
-
-
Save deque-blog/b1bcce262e3da02102494c4e1fa1eef1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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