X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=flower%2Finclude%2Fstd-vector.hh;h=43fed22f6846af88b99c8b8dec7f1944e9b25f55;hb=1881044742efa5072bad5e31189e610ed3988270;hp=3940c938ad807bc51422bad9a114c64c482da06d;hpb=92eb006cff3771c5f76058de84ae9e0ad9e74eb4;p=lilypond.git diff --git a/flower/include/std-vector.hh b/flower/include/std-vector.hh index 3940c938ad..43fed22f68 100644 --- a/flower/include/std-vector.hh +++ b/flower/include/std-vector.hh @@ -1,9 +1,20 @@ /* - std-vector.hh -- declare vector + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 2006--2011 Jan Nieuwenhuizen - (c) 2006--2007 Jan Nieuwenhuizen + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #ifndef STD_VECTOR_HH @@ -26,10 +37,6 @@ using namespace std; -#if HAVE_BOOST_LAMBDA_LAMBDA_HPP -#include -#endif - template int default_compare (T const &a, T const &b) { @@ -63,7 +70,7 @@ typedef size_t vsize; #if HAVE_STL_DATA_METHOD #include #else /* !HAVE_STL_DATA_METHOD */ -#define vector __vector +#define vector __flower_vector #include #undef vector @@ -71,21 +78,21 @@ namespace std { /* Interface without pointer arithmetic (iterator) semantics. */ template > - class vector : public __vector + class vector : public __flower_vector { public: - typedef typename __vector::iterator iterator; - typedef typename __vector::const_iterator const_iterator; + typedef typename __flower_vector::iterator iterator; + typedef typename __flower_vector::const_iterator const_iterator; - vector () : __vector () + vector () : __flower_vector () { } - vector (vector const& v) : __vector (v) + vector (vector const& v) : __flower_vector (v) { } - vector (const_iterator b, const_iterator e) : __vector (b, e) + vector (const_iterator b, const_iterator e) : __flower_vector (b, e) { } @@ -227,18 +234,6 @@ find (vector const &v, T const &key) return find (v.begin (), v.end (), key); } -#if HAVE_BOOST_LAMBDA_LAMBDA_HPP -#include -using namespace boost::lambda; -template -void -junk_pointers (vector &v) -{ - for_each (v.begin (), v.end (), (delete _1, _1 = 0)); - v.clear (); -} -#else - template struct del : public unary_function { void operator() (T x) @@ -256,7 +251,6 @@ junk_pointers (vector &v) for_each (v.begin (), v.end (), del ()); v.clear (); } -#endif /* HAVE_BOOST_LAMBDA */ vector string_split (string str, char c); string string_join (vector const &strs, string infix);