Skip to content

Instantly share code, notes, and snippets.

@thiagomg
Last active August 29, 2015 14:27
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 thiagomg/ec2b45c5d326325b5600 to your computer and use it in GitHub Desktop.
Save thiagomg/ec2b45c5d326325b5600 to your computer and use it in GitHub Desktop.
range for
class CashFlow {
using CashMap = multimap<Cash::Date, Cash>;
using const_iterator = multimap<Cash::Date, Cash>::const_iterator;
multimap<Cash::Date, Cash> _flow;
//...
};
template<typename T>
struct CashRange {
using const_iterator = typename T::const_iterator;        
const const_iterator begin() const { return _begin; }
const const_iterator end() const { return _end; }
//...
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment