diff -urN scantailor-0.9.10-old/compat/boost_multi_index_foreach_fix.h scantailor-0.9.10/compat/boost_multi_index_foreach_fix.h --- scantailor-0.9.10-old/compat/boost_multi_index_foreach_fix.h 1970-01-01 07:00:00.000000000 +0700 +++ scantailor-0.9.10/compat/boost_multi_index_foreach_fix.h 2011-12-05 02:03:53.000000000 +0700 @@ -0,0 +1,46 @@ +/* + Scan Tailor - Interactive post-processing tool for scanned pages. + Copyright (C) Joseph Artsimovich + + This program 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. + + This program 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 this program. If not, see . +*/ + +#ifndef BOOST_MULTI_INDEX_FOREACH_FIX_H_ +#define BOOST_MULTI_INDEX_FOREACH_FIX_H_ + +#include +#include +#include + +// BOOST_FOREACH() in boost >= 1.47 has problems with gcc >= 4.6 +// These problems aren't specific to boost::multi_index, +// but the code below only deals with it. +// In future versions of boost, they might include equivalent +// code in boost::multi_index itself, which will lead to build problems. +// If / when this happens, conditional compilation will be necessary. + +namespace boost +{ +namespace foreach +{ + +template +struct is_noncopyable > : mpl::true_ +{ +}; + +} // namespace foreach +} // namespace boost + +#endif diff -urN scantailor-0.9.10-old/ProjectWriter.cpp scantailor-0.9.10/ProjectWriter.cpp --- scantailor-0.9.10-old/ProjectWriter.cpp 2011-07-31 03:47:25.000000000 +0700 +++ scantailor-0.9.10/ProjectWriter.cpp 2011-12-05 02:14:04.000000000 +0700 @@ -25,6 +25,7 @@ #include "ImageMetadata.h" #include "AbstractFilter.h" #include "FileNameDisambiguator.h" +#include "compat/boost_multi_index_foreach_fix.h" #include #include #include diff -urN scantailor-0.9.10-old/zones/EditableZoneSet.h scantailor-0.9.10/zones/EditableZoneSet.h --- scantailor-0.9.10-old/zones/EditableZoneSet.h 2011-07-31 03:47:25.000000000 +0700 +++ scantailor-0.9.10/zones/EditableZoneSet.h 2011-12-05 02:06:11.000000000 +0700 @@ -24,6 +24,8 @@ #include "PropertySet.h" #include "IntrusivePtr.h" #include +#include +#include #include #include @@ -102,4 +104,18 @@ PropertySet m_defaultProps; }; +namespace boost +{ +namespace foreach +{ + +// Make BOOST_FOREACH work with the above class (necessary for boost >= 1.46 with gcc >= 4.6) +template<> +struct is_noncopyable : public boost::mpl::true_ +{ +}; + +} // namespace foreach +} // namespace boost + #endif