Commit 46b9f5ee authored by Luc Hermitte's avatar Luc Hermitte

COMP: boost.FOREACH requires noncopyable types to be flagged as such

parent 6c15f857
......@@ -304,7 +304,7 @@ void otb::ogr::DataSource::PrintSelf(
std::ostream& os, itk::Indent indent) const
{
assert(m_DataSource && "Datasource not initialized");
BOOST_FOREACH(Layer const l, *this)
BOOST_FOREACH(Layer const& l, *this)
{
l.PrintSelf(os, indent);
}
......
......@@ -24,6 +24,7 @@
#include <boost/mpl/if.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/noncopyable.hpp>
#include "itkVector.h"
#include "itkPoint.h"
......@@ -164,7 +165,7 @@ private:
* - \c SetDriver() & \c GetDriver()
* - all functions related to the reference count.
*/
class DataSource : public itk::DataObject
class DataSource : public itk::DataObject , public boost::noncopyable
{
public:
/**\name Standard ITK typedefs */
......@@ -269,7 +270,7 @@ public:
container_type;
public:
layer_iter(container_type & datasource, size_t index);
layer_iter(); ;
layer_iter();
template <class OtherValue> layer_iter(
layer_iter<OtherValue> const& other,
......@@ -576,6 +577,14 @@ private:
}; // end class DataSource
} } // end namespace otb::ogr
#if 0
namespace boost { namespace foreach {
template<typename T> struct is_noncopyable; // forward declaration
template <>
struct is_noncopyable<otb::ogr::DataSource> : mpl::true_ {};
}}
#endif
#ifndef OTB_MANUAL_INSTANTIATION
#include "otbOGRDataSourceWrapper.txx"
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment