| 919 | } |
| 920 | |
| 921 | std::pair<any_map::iterator, bool> |
| 922 | any_map::insert(value_type const& value) |
| 923 | { |
| 924 | switch (type) |
| 925 | { |
| 926 | case map_type::ORDERED_MAP: |
| 927 | { |
| 928 | auto p = o_m().insert(value); |
| 929 | return { iterator(std::move(p.first)), p.second }; |
| 930 | } |
| 931 | case map_type::UNORDERED_MAP: |
| 932 | { |
| 933 | auto p = uo_m().insert(value); |
| 934 | return { iterator(std::move(p.first), iterator::UNORDERED), p.second }; |
| 935 | } |
| 936 | case map_type::UNORDERED_MAP_CASEINSENSITIVE_KEYS: |
| 937 | { |
| 938 | auto p = uoci_m().insert(value); |
| 939 | return { iterator(std::move(p.first), iterator::UNORDERED_CI), p.second }; |
| 940 | } |
| 941 | default: |
| 942 | throw std::logic_error("invalid map type"); |
| 943 | } |
| 944 | } |
| 945 | |
| 946 | any_map::const_iterator |
| 947 | any_map::find(key_type const& key) const |
no outgoing calls