2
// Copyright (C) 2006-2011 Tobias Sargeant (tobias.sargeant@gmail.com).
3
// All rights reserved.
5
// This file is part of the Carve CSG Library (http://carve-csg.com/)
7
// This file may be used under the terms of the GNU General Public
8
// License version 2.0 as published by the Free Software Foundation
9
// and appearing in the file LICENSE.GPL2 included in the packaging of
12
// This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
13
// INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
14
// A PARTICULAR PURPOSE.
20
#include <carve/collection/unordered.hpp>
24
template<typename set_t>
25
class set_insert_iterator : public std::iterator<std::output_iterator_tag, void, void, void, void> {
31
set_insert_iterator(set_t &s) : set(&s) {
35
operator=(typename set_t::const_reference value) {
40
set_insert_iterator &operator*() { return *this; }
41
set_insert_iterator &operator++() { return *this; }
42
set_insert_iterator &operator++(int) { return *this; }
45
template<typename set_t>
46
inline set_insert_iterator<set_t>
47
set_inserter(set_t &s) {
48
return set_insert_iterator<set_t>(s);