From 8e761289a2446367267c6c0d9a26e734f0f78306 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 16 Dec 2020 20:29:05 +0300 Subject: Get rid of legacy build systems and rename cutl/ to libcutl/ --- cutl/container/map-iterator.hxx | 68 ----------------------------------------- 1 file changed, 68 deletions(-) delete mode 100644 cutl/container/map-iterator.hxx (limited to 'cutl/container/map-iterator.hxx') diff --git a/cutl/container/map-iterator.hxx b/cutl/container/map-iterator.hxx deleted file mode 100644 index e07d3e5..0000000 --- a/cutl/container/map-iterator.hxx +++ /dev/null @@ -1,68 +0,0 @@ -// file : cutl/container/map-iterator.hxx -// 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 - 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 - 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 -- cgit v1.1