Is it possible to store a list in an interval map?
Hello, I have code like: int c1 = 1; set<int> s1; s1.insert(c1); // Add a number to a set interval_map< date, set<int> > cmap; // Declare an interval_map discrete_interval<date> range1 = discrete_interval<date>::closed(from_string("2012-01-01"), from_string("2012-01-30")); // Define the interval cmap += make_pair(range1, s1); // Associate the interval with the set This works well. But boost complains if I change the 'set' to a 'list' in the above code. Is only the 'set' supported as a value? Thanks! -- Twitter: @Blismobile http://twitter.com/#!/blismobile BlisMobile Media 32 Percy Street, London W1T 2DE www.blismobile.com [image: BlisMobile] http://www.blismobile.com/[image: Follow on Twitter]http://twitter.com/#!/blismobile[image: Blis Website] http://www.blismobile.com/ This communication is from BlisMobile Media, which is a trading name of Breeze Tech (UK) Ltd, a company registered in England and Wales with registered number 06455773. Its registered office is 32 Percy Street, London W1T 2DE, United Kingdom. This communication contains information that is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s), please (1) notify info@blismobile.com by forwarding this email and delete all copies from your system and (2) note that disclosure, distribution, copying or use of this communication is strictly prohibited. Email communications cannot be guaranteed to be secure or free from error or viruses. All emails sent to or from a Blismobile email account are securely archived and stored by an external supplier. This email does not constitute a contractual agreement; such agreements are in specified contractual or Insertion Order (IO) form only and exclusively contain all the terms to which Breeze Tech )UK) Ltd will be bound. To the extent permitted by law, Breeze Tech (UK) Ltd does not accept any liability for use of or reliance on the contents of this email by any person save by the intended recipient(s) to the extent agreed in a contract or Insertion Order. Opinions, conclusions and other information in this email which have not been delivered by way of the business of Breeze Tech (UK) Ltd are neither given nor endorsed by it.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi! Am 23.03.12 16:07, schrieb Rajalakshmi Iyer:
But boost complains if I change the 'set' to a 'list' in the above code.
Is only the 'set' supported as a value?
Only 'set' is supported by default. An interval_map requires a method to combine values into new ones, called aggregation. For 'set' this is the set union. But for lists there is no generic way by default. See here: http://www.boost.org/doc/libs/1_49_0/libs/icl/doc/html/boost_icl/concepts/ag... Implement some aggregation for 'list' first! HTH, Frank -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: keyserver x-hkp://pool.sks-keyservers.net iEYEARECAAYFAk9vk9AACgkQhAOUmAZhnmp6EACfa8VuW6TVOLAH6KV9Xffw2vFu TnUAnRoSGCbwVs8FiL/j9p3Ncd85GN0M =6lbs -----END PGP SIGNATURE-----
participants (2)
-
Frank Birbacher
-
Rajalakshmi Iyer