1

I have been using a using a boost tuple as the value in an STL map. Up until now, I only had to construct the tuple and insert into the map and at a later stage retrieve the values.

Now I need to be able to change the tuple in the map. Is this possible, or have I run into the one place you should'nt be using tuples instead of structs.

thanks

Pradyot
  • 2,897
  • 7
  • 41
  • 58

1 Answers1

3

As long as the tuple is the map value and not the key, the tuple is perfectly mutable:

http://www.boost.org/doc/libs/1_41_0/libs/tuple/doc/tuple_users_guide.html#accessing_elements

Sebastian
  • 4,802
  • 23
  • 48