Subject: [Boost-bugs] [Boost C++ Libraries] #8858: Compile error in boost range when trying to use boost string split
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-07-18 22:28:05
#8858: Compile error in boost range when trying to use boost string split
-----------------------------------------------+-----------------------
Reporter: Blair Jennings <blair.jennings@â¦> | Owner: marshall
Type: Bugs | Status: new
Milestone: To Be Determined | Component: algorithm
Version: Boost 1.54.0 | Severity: Problem
Keywords: string split |
-----------------------------------------------+-----------------------
I am trying to replace some old string split code with the string split
algorithm, but am getting compile errors. OS CentOs 6.3, Boost 1.53 and
1.54 gcc 4.8.1 without -std=c++ parameter. I have done an extensive search
and tried multiple possible fixes and the error still occurs.
Here is the error:
In file included from /opt/boost_1_53/boost/range/concepts.hpp:21:0,
from XXXX.C:37:
/opt/boost_1_53/boost/range/begin.hpp: In instantiation of 'typename
boost::range_iterator<C>::type boost::range_detail::range_begin(C&) [with
C = const boost::sub_match<__gnu_cxx::__normal_iterator<const char*,
std::basic_string<char> > >; typename boost::range_iterator<C>::type =
__gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >]':
/opt/boost_1_53/boost/range/begin.hpp:119:27: required from 'typename
boost::range_iterator<const T>::type boost::range_adl_barrier::begin(const
T&) [with T = boost::sub_match<__gnu_cxx::__normal_iterator<const char*,
std::basic_string<char> > >; typename boost::range_iterator<const T>::type
= __gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >]'
/opt/boost_1_53/boost/range/iterator_range_core.hpp:56:64: required from
'static IteratorT
boost::iterator_range_detail::iterator_range_impl<IteratorT>::adl_begin(ForwardRange&)
[with ForwardRange = const
boost::sub_match<__gnu_cxx::__normal_iterator<const char*,
std::basic_string<char> > >; IteratorT =
__gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >]'
/opt/boost_1_53/boost/range/iterator_range_core.hpp:198:45: required
from 'boost::iterator_range<IteratorT>::iterator_range(const Range&,
boost::iterator_range_detail::const_range_tag) [with Range =
boost::sub_match<__gnu_cxx::__normal_iterator<const char*,
std::basic_string<char> > >; IteratorT =
__gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >]'
/opt/boost_1_53/boost/range/iterator_range_core.hpp:564:63: required
from 'boost::iterator_range<typename boost::range_iterator<const T>::type>
boost::make_iterator_range(const ForwardRange&) [with ForwardRange =
boost::sub_match<__gnu_cxx::__normal_iterator<const char*,
std::basic_string<char> > >; typename boost::range_iterator<const T>::type
= __gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >]'
/opt/boost_1_53/boost/range/as_literal.hpp:93:50: required from
'boost::iterator_range<typename boost::range_iterator<C>::type>
boost::range_detail::make_range(T&, long int) [with T = const
boost::sub_match<__gnu_cxx::__normal_iterator<const char*,
std::basic_string<char> > >; typename boost::range_iterator<C>::type =
__gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >]'
/opt/boost_1_53/boost/range/as_literal.hpp:109:74: required from
'boost::iterator_range<typename boost::range_iterator<const T>::type>
boost::as_literal(const Range&) [with Range =
boost::sub_match<__gnu_cxx::__normal_iterator<const char*,
std::basic_string<char> > >; typename boost::range_iterator<const T>::type
= __gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >]'
/opt/boost_1_53/boost/algorithm/string/iter_find.hpp:153:115: required
from 'SequenceSequenceT& boost::algorithm::iter_split(SequenceSequenceT&,
RangeT&, FinderT) [with SequenceSequenceT =
std::vector<std::basic_string<char> >; RangeT = const
boost::sub_match<__gnu_cxx::__normal_iterator<const char*,
std::basic_string<char> > >; FinderT =
boost::algorithm::detail::token_finderF<boost::algorithm::detail::is_any_ofF<char>
>]'
/opt/boost_1_53/boost/algorithm/string/split.hpp:149:69: required from
'SequenceSequenceT& boost::algorithm::split(SequenceSequenceT&, RangeT&,
PredicateT, boost::algorithm::token_compress_mode_type) [with
SequenceSequenceT = std::vector<std::basic_string<char> >; RangeT = const
boost::sub_match<__gnu_cxx::__normal_iterator<const char*,
std::basic_string<char> > >; PredicateT =
boost::algorithm::detail::is_any_ofF<char>]'
XXXX.C:1287:60: required from here
/opt/boost_1_53/boost/range/begin.hpp:49:24: error: 'const struct
boost::sub_match<__gnu_cxx::__normal_iterator<const char*,
std::basic_string<char> > >' has no member named 'begin'
return c.begin();
^
In file included from /opt/boost_1_53/boost/range/concepts.hpp:22:0,
from XXXX.C:37:
/opt/boost_1_53/boost/range/end.hpp: In instantiation of 'typename
boost::range_iterator<C>::type boost::range_detail::range_end(C&) [with C
= const boost::sub_match<__gnu_cxx::__normal_iterator<const char*,
std::basic_string<char> > >; typename boost::range_iterator<C>::type =
__gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >]':
/opt/boost_1_53/boost/range/end.hpp:113:25: required from 'typename
boost::range_iterator<const T>::type boost::range_adl_barrier::end(const
T&) [with T = boost::sub_match<__gnu_cxx::__normal_iterator<const char*,
std::basic_string<char> > >; typename boost::range_iterator<const T>::type
= __gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >]'
/opt/boost_1_53/boost/range/iterator_range_core.hpp:62:62: required from
'static IteratorT
boost::iterator_range_detail::iterator_range_impl<IteratorT>::adl_end(ForwardRange&)
[with ForwardRange = const
boost::sub_match<__gnu_cxx::__normal_iterator<const char*,
std::basic_string<char> > >; IteratorT =
__gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >]'
make[1]: Leaving directory `/for_blair/workspace/bluemax3/libcommon/src'
/opt/boost_1_53/boost/range/iterator_range_core.hpp:198:74: required
from 'boost::iterator_range<IteratorT>::iterator_range(const Range&,
boost::iterator_range_detail::const_range_tag) [with Range =
boost::sub_match<__gnu_cxx::__normal_iterator<const char*,
std::basic_string<char> > >; IteratorT =
__gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >]'
/opt/boost_1_53/boost/range/iterator_range_core.hpp:564:63: required
from 'boost::iterator_range<typename boost::range_iterator<const T>::type>
boost::make_iterator_range(const ForwardRange&) [with ForwardRange =
boost::sub_match<__gnu_cxx::__normal_iterator<const char*,
std::basic_string<char> > >; typename boost::range_iterator<const T>::type
= __gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >]'
/opt/boost_1_53/boost/range/as_literal.hpp:93:50: required from
'boost::iterator_range<typename boost::range_iterator<C>::type>
boost::range_detail::make_range(T&, long int) [with T = const
boost::sub_match<__gnu_cxx::__normal_iterator<const char*,
std::basic_string<char> > >; typename boost::range_iterator<C>::type =
__gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >]'
/opt/boost_1_53/boost/range/as_literal.hpp:109:74: required from
'boost::iterator_range<typename boost::range_iterator<const T>::type>
boost::as_literal(const Range&) [with Range =
boost::sub_match<__gnu_cxx::__normal_iterator<const char*,
std::basic_string<char> > >; typename boost::range_iterator<const T>::type
= __gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >]'
/opt/boost_1_53/boost/algorithm/string/iter_find.hpp:153:115: required
from 'SequenceSequenceT& boost::algorithm::iter_split(SequenceSequenceT&,
RangeT&, FinderT) [with SequenceSequenceT =
std::vector<std::basic_string<char> >; RangeT = const
boost::sub_match<__gnu_cxx::__normal_iterator<const char*,
std::basic_string<char> > >; FinderT =
boost::algorithm::detail::token_finderF<boost::algorithm::detail::is_any_ofF<char>
>]'
/opt/boost_1_53/boost/algorithm/string/split.hpp:149:69: required from
'SequenceSequenceT& boost::algorithm::split(SequenceSequenceT&, RangeT&,
PredicateT, boost::algorithm::token_compress_mode_type) [with
SequenceSequenceT = std::vector<std::basic_string<char> >; RangeT = const
boost::sub_match<__gnu_cxx::__normal_iterator<const char*,
std::basic_string<char> > >; PredicateT =
boost::algorithm::detail::is_any_ofF<char>]'
XXXX.C:1287:60: required from here
/opt/boost_1_53/boost/range/end.hpp:50:26: error: 'const struct
boost::sub_match<__gnu_cxx::__normal_iterator<const char*,
std::basic_string<char> > >' has no member named 'end'
return c.end();
^
In file included from /opt/boost_1_53/boost/range/concepts.hpp:21:0,
from XXXX.C:37:
/opt/boost_1_53/boost/range/begin.hpp: In function 'typename
boost::range_iterator<C>::type boost::range_detail::range_begin(C&) [with
C = const boost::sub_match<__gnu_cxx::__normal_iterator<const char*,
std::basic_string<char> > >; typename boost::range_iterator<C>::type =
__gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >]':
/opt/boost_1_53/boost/range/begin.hpp:50:5: warning: control reaches end
of non-void function [-Wreturn-type]
}
^
In file included from /opt/boost_1_53/boost/range/concepts.hpp:22:0,
from XXXX.C:37:
/opt/boost_1_53/boost/range/end.hpp: In function 'typename
boost::range_iterator<C>::type boost::range_detail::range_end(C&) [with C
= const boost::sub_match<__gnu_cxx::__normal_iterator<const char*,
std::basic_string<char> > >; typename boost::range_iterator<C>::type =
__gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >]':
/opt/boost_1_53/boost/range/end.hpp:51:9: warning: control reaches end of
non-void function [-Wreturn-type]
}
^
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8858> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC