Hi,
From the docs, I don't see the Iterator argument is required to be
default-constructible.
I have a gcc4.3.3 error stack that looks like:
/usr/include/boost-1_37/boost/iterator/iterator_adaptor.hpp: In constructor
'boost::iterator_adaptor::iterator_adaptor() [with Derived =
boost::transform_iteratorMathTest::Curve1D::CurveSVOTrait::G
etXIter, Math::CurveContainerIter, 4u, true>,
boost::use_default, boost::use_default>, Base =
Math::CurveContainerIter, 4u, true>, Value = const
double, Traversal = boost::use_default, Reference = const double&,
Difference = boost::use_default]':
/usr/include/boost-1_37/boost/iterator/transform_iterator.hpp:100:
instantiated from 'boost::transform_iterator::transform_iterator() [with UnaryFunc =
Math::Curve1DMathTest::Curve1D::CurveSVOTrait::GetXIter, Iterator =
Math::CurveContainerIter, 4u, true>, Reference =
boost::use_default, Value = boost::use_default]'
/usr/lib/gcc/x86_64-redhat-linux/4.3.3/../../../../include/c++/4.3.3/bits/st
l_algo.h:2086: instantiated from '_FIter std::lower_bound(_FIter, _FIter,
const _Tp&) [with _FIter =
boost::transform_iteratorMathTest::Curve1D::CurveSVOTrait::G
etXIter, Math::CurveContainerIter, 4u, true>,
boost::use_default, boost::use_default>, _Tp = double]'
_____
math/interExtrapolators/interExtrapolate.hpp:75: instantiated from
'typename std::iterator_traits<fIterType>::value_type
Math::InterExtrapolators::InterExtrapolate(xIterType, xIterType, fIterType,
typename std::iterator_traits<_OI>::value_type, typename
boost::call_traits<T>::param_type, typename
boost::call_traits<Extrap>::param_type) [with Interp =
Math::InterExtrapolators::StairCase1D, Extrap =
Math::InterExtrapolators::StairCase1D, xIterType =
boost::transform_iteratorMathTest::Curve1D::CurveSVOTrait::G
etXIter, Math::CurveContainerIter, 4u, true>,
boost::use_default, boost::use_default>, fIterType =
boost::transform_iteratorMathTest::Curve1D::CurveSVOTrait::G
etFIter, Math::CurveContainerIter, 4u, true>,
boost::use_default, boost::use_default>]'
...
mathTest/curve1D.cpp:72: instantiated from here
/usr/include/boost-1_37/boost/iterator/iterator_adaptor.hpp:279: error: no
matching function for call to 'Math::CurveContainerIter, 4u, true>::CurveContainerIter()'
where it seems the compiler is looking for CurveContainerIter() with no
arguments.
but such constructor does not exist because the iterator has a member
reference to the container.
Or is this a requirement of std::lower_bound? Basically, the last line of
the stack that is my code is
xIterType xiter = std::lower_bound( xbegin, xend, x );
where xIterType is
typedef boost::transform_iterator
xIterType;
GetXIter is a unary function object, and ContainerConstIterType is
CurveContainerIter<..., true> , true being for const'ness of the iterator.
Xbegin, xend and x all of xIterType
Regards,