Market use country index instead of instance#644
Conversation
616cc64 to
482bad4
Compare
|
Once you start passing around size_t indexes instead of types, you lose a lot of type safety because it is easy to accidentally pass an index to a different array. The solution to this problem is to introduce strongly typed index wrappers around the size_t values so that you can use the type system to ensure that array lookups and function calls can only be performed with an index of the right kind. |
True. We consider using https://github.com/foonathan/type_safe to tag types. |
dd82717 to
92070db
Compare
ae05d99 to
08cb395
Compare
9074bfd to
4874d86
Compare
4874d86 to
1df5d14
Compare
When the economy is split from CountryInstance (see #638 ) we may not have access to the CountryInstance when placing orders and can use the country index instead. There market does nothing with CountryInstance. It merely accesses IndexedFlatMaps with CountryInstance as key.
Depends on #658 + #659