Boost logo

Boost Users :

From: Leif Gruenwoldt (leifer_at_[hidden])
Date: 2006-05-11 16:16:47


Sorry for all the blabber. Turns out it was my fault obviously. I had
"#define Last 13" in my code.

Thread closed. :)

On 5/11/06, Leif Gruenwoldt <leifer_at_[hidden]> wrote:
> Update: I ran my source file that was failing to build through cpp.
> The variable 'Last' is being replaced with a 13.
>
> ---------------------
>
> template< typename ForwardIteratorT >
> iterator_range<ForwardIteratorT>
> findit(
> ForwardIteratorT Begin,
> ForwardIteratorT End,
> std::forward_iterator_tag ) const
> {
> typedef ForwardIteratorT input_iterator_type;
> typedef iterator_range<ForwardIteratorT> result_type;
>
> first_finder_type first_finder(
> m_Search.begin(), m_Search.end(), m_Comp );
>
> result_type M=first_finder( Begin, End );
> result_type 13=M;
>
> while( M )
> {
> 13=M;
> M=first_finder( end(M), End );
> }
>
> return 13;
> }
>
> -----------------------
>
>
>
> On 5/11/06, Leif Gruenwoldt <leifer_at_[hidden]> wrote:
> > BTW. Here is the function in boost/algorithm that the build error points to.
> >
> > private:
> > // forward iterator
> > template< typename ForwardIteratorT >
> > iterator_range<ForwardIteratorT>
> > findit(
> > ForwardIteratorT Begin,
> > ForwardIteratorT End,
> > std::forward_iterator_tag ) const
> > {
> > typedef ForwardIteratorT input_iterator_type;
> > typedef iterator_range<ForwardIteratorT> result_type;
> >
> > first_finder_type first_finder(
> > m_Search.begin(), m_Search.end(), m_Comp );
> >
> > result_type M=first_finder( Begin, End );
> > result_type Last=M;
> > <-------------------- THIS LINE HERE
> >
> > while( M )
> > {
> > Last=M;
> > M=first_finder( end(M), End );
> > }
> >
> > return Last;
> > }
> >
> > On 5/11/06, Leif Gruenwoldt <leifer_at_[hidden]> wrote:
> > > I should note I'm using boost-1.33.1-4 for fedora core 4.
> > >
> > >
> > > On 5/11/06, Leif Gruenwoldt <leifer_at_[hidden]> wrote:
> > > > I have implemented a class ( lets call it LC2DateTime ) that uses
> > > > boost date time in it's implementation. I also have a small test for
> > > > this class and it builds nicely and runs properly. However when I
> > > > include LC2DateTime.h in my larger project I get this odd build error
> > > > that points me to
> > > > /usr/include/boost/algorithm/string/detail/finder.hpp as the source of
> > > > the error.
> > > >
> > > > ------------------
> > > >
> > > > /usr/include/boost/algorithm/string/detail/finder.hpp: In member
> > > > function 'boost::iterator_range<Iterator>
> > > > boost::algorithm::detail::last_finderF<SearchIteratorT,
> > > > PredicateT>::findit(ForwardIteratorT, ForwardIteratorT,
> > > > std::forward_iterator_tag) const':
> > > > /usr/include/boost/algorithm/string/detail/finder.hpp:150: error:
> > > > expected unqualified-id before numeric constant
> > > > /usr/include/boost/algorithm/string/detail/util.hpp: At global scope:
> > > > /usr/include/boost/algorithm/string/detail/util.hpp:71: error:
> > > > expected ',' or '...' before numeric constant
> > > > /usr/include/boost/algorithm/string/detail/util.hpp: In function
> > > > 'OutputIteratorT
> > > > boost::algorithm::detail::bounded_copy(InputIteratorT,
> > > > InputIteratorT)':
> > > > /usr/include/boost/algorithm/string/detail/util.hpp:76: error:
> > > > 'DestFirst' was not declared in this scope
> > > > /usr/include/boost/algorithm/string/detail/util.hpp:77: error:
> > > > 'DestLast' was not declared in this scope
> > > >
> > > > ----------------------
> > > >
> > > > This bug has been bothering me for a while and I actually got my
> > > > project to build again juggling the placement of of the '#include
> > > > "LC2DateTime.h" above the other includes in my project. However this
> > > > problem has reared it's head again and this time no amount of juggling
> > > > of includes is getting me out of this.
> > > >
> > > > Any thoughts? Is this a problem with the boost libraries or my code?
> > > >
> > > > --
> > > > Leif Gruenwoldt
> > > > Simulation Software Developer
> > > > DLCSPM 4-4-3 (c)
> > > > Building A31
> > > > CFB Kingston
> > > >
> > >
> > >
> > > --
> > > Leif Gruenwoldt
> > > Simulation Software Developer
> > > DLCSPM 4-4-3 (c)
> > > Building A31
> > > CFB Kingston
> > >
> >
> >
> > --
> > Leif Gruenwoldt
> > Simulation Software Developer
> > DLCSPM 4-4-3 (c)
> > Building A31
> > CFB Kingston
> >
>
>
> --
> Leif Gruenwoldt
> Simulation Software Developer
> DLCSPM 4-4-3 (c)
> Building A31
> CFB Kingston
>

-- 
Leif Gruenwoldt
Simulation Software Developer
DLCSPM 4-4-3 (c)
Building A31
CFB Kingston

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net