Created
November 5, 2015 13:53
-
-
Save thiagomg/3a500e045844e4a4c0c0 to your computer and use it in GitHub Desktop.
Ciclic dependency problem
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
//Resulting file after pre-processing ---- | |
int get_total(std::vector<int> &v); | |
struct int_vector { | |
//implementation details ... | |
int size() { return _size; } | |
int operator[](int pos) { | |
return _data[pos]; | |
} | |
int *_data; | |
}; | |
int get_total(std::vector<int> &v) { | |
return std::accumulate(begin(v), end(v)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment