diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2024-03-06 10:24:11 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2024-03-06 10:24:11 +0100 |
commit | 4538829ab86b5a1cd4e845e7eab165029c9d6d46 (patch) | |
tree | bbadf39aed0610c8f8f7b41fefff47773b8ac205 /libcutl/cutl/container/map-iterator.hxx | |
parent | 23d41842168ac1a1580111b9c5c73500ceee3d57 (diff) | |
parent | aad5ad9bf0c02aa4e79bc6b7d6c934612fff4026 (diff) |
Update upstream source from tag 'upstream/4.2.0'
Update to upstream version '4.2.0'
with Debian dir 1b38df7bbcf313223de3c50107ac0255090fe647
Diffstat (limited to 'libcutl/cutl/container/map-iterator.hxx')
-rw-r--r-- | libcutl/cutl/container/map-iterator.hxx | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/libcutl/cutl/container/map-iterator.hxx b/libcutl/cutl/container/map-iterator.hxx deleted file mode 100644 index 051ffb5..0000000 --- a/libcutl/cutl/container/map-iterator.hxx +++ /dev/null @@ -1,69 +0,0 @@ -// file : cutl/container/map-iterator.hxx -// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC -// license : MIT; see accompanying LICENSE file - -#ifndef CUTL_CONTAINER_MAP_ITERATOR_HXX -#define CUTL_CONTAINER_MAP_ITERATOR_HXX - -namespace cutl -{ - namespace container - { - // Map iterator adapter that can be used to implement multi-index - // containers, as discussed in the following post: - // - // http://www.codesynthesis.com/~boris/blog/2012/09/11/emulating-boost-multi-index-with-std-containers/ - // - template <typename M> - struct map_iterator: M::iterator - { - typedef typename M::iterator base_iterator; - typedef typename M::value_type::second_type value_type; - typedef value_type* pointer; - typedef value_type& reference; - - map_iterator () {} - map_iterator (base_iterator i): base_iterator (i) {} - - reference - operator* () const - { - return base_iterator::operator* ().second; - } - - pointer - operator-> () const - { - return &base_iterator::operator-> ()->second; - } - }; - - template <typename M> - struct map_const_iterator: M::const_iterator - { - typedef typename M::iterator base_iterator; - typedef typename M::const_iterator base_const_iterator; - typedef const typename M::value_type::second_type value_type; - typedef value_type* pointer; - typedef value_type& reference; - - map_const_iterator () {} - map_const_iterator (base_iterator i): base_const_iterator (i) {} - map_const_iterator (base_const_iterator i): base_const_iterator (i) {} - - reference - operator* () const - { - return base_const_iterator::operator* ().second; - } - - pointer - operator-> () const - { - return &base_const_iterator::operator-> ()->second; - } - }; - } -} - -#endif // CUTL_CONTAINER_MAP_ITERATOR_HXX |