Boost logo

Boost Users :

From: Anibal Jodorcovsky (anibal_at_[hidden])
Date: 2002-10-12 10:22:45


Hi all,

I've been using regex 3.20 with g++ 2.95.3 with no problems. We're in the
process of moving towards g++ 3.1.1 (we have a library we need to use and it
core dumps with 2.95.3 due to a bug in the stdc++ that goes with it in
ofstream).

So, I have g++ 3.1.1 working fine in redhat 6.2. I couldn't find the regex
standalone library so I ended up downloading the whole boost suite (1_29_0)
and I built only the regex++ library.

I have one comment regarding this version (which I don't know what it is
BTW. What's the version of regex++ in boost 1_29_0?, I guess it's 3.31).

It seems that boost:cmatch doesn't work anymore when doing a regex_search, I
ended up modifying boost:cmatch with
boost::match_results<std::string::const_iterator>, I hope that's ok.

I'm also having some trouble compiling some code but this is a problem with
the new STL implementation that ships with g++ 3.1.1 (the v3 STL). I can't
seem to find the solution, that's why I'm asking here, if anybody has any
pointers I'll be very grateful.

Look at what I get:

commit.cpp: In function `void findSopInstances(IDB_HANDLE**, const
   std::vector<CommitSopInfo, std::allocator<CommitSopInfo> >&,
   std::vector<CommitSopInfo, std::allocator<CommitSopInfo> >&,
   std::vector<CommitSopInfo, std::allocator<CommitSopInfo> >&)':
commit.cpp:737: conversion from `__gnu_cxx::__normal_iterator<const
   CommitSopInfo*, std::vector<CommitSopInfo, std::allocator<CommitSopInfo>
> >
   ' to non-scalar type `__gnu_cxx::__normal_iterator<const CommitSopInfo*,
   std::vector<const CommitSopInfo, std::allocator<const CommitSopInfo> > >'
   requested
commit.cpp:738: no match for `__gnu_cxx::__normal_iterator<const
   CommitSopInfo*, std::vector<const CommitSopInfo, std::allocator<const
   CommitSopInfo> > >& < __gnu_cxx::__normal_iterator<const CommitSopInfo*,
   std::vector<CommitSopInfo, std::allocator<CommitSopInfo> > >' operator
commit.cpp:742: cannot convert `__gnu_cxx::__normal_iterator<const
   CommitSopInfo*, std::vector<const CommitSopInfo, std::allocator<const
   CommitSopInfo> > >' to `const CommitSopInfo*' for argument `2' to `bool
   haveSopInstance(IDB_HANDLE**, const CommitSopInfo*)'
commit.cpp: In function `int buildSopSeq(const std::vector<CommitSopInfo,
   std::allocator<CommitSopInfo> >&, SQ_TYPE, void***)':
commit.cpp:913: conversion from `__gnu_cxx::__normal_iterator<const
   CommitSopInfo*, std::vector<CommitSopInfo, std::allocator<CommitSopInfo>
> >
   ' to non-scalar type `__gnu_cxx::__normal_iterator<const CommitSopInfo*,
   std::vector<const CommitSopInfo, std::allocator<const CommitSopInfo> > >'
   requested
commit.cpp:914: no match for `__gnu_cxx::__normal_iterator<const
   CommitSopInfo*, std::vector<const CommitSopInfo, std::allocator<const
   CommitSopInfo> > >& < __gnu_cxx::__normal_iterator<const CommitSopInfo*,
   std::vector<CommitSopInfo, std::allocator<CommitSopInfo> > >' operator
make: *** [commit.o] Error 1

And the code it complains about is this:

static void findSopInstances( IDB_HANDLE** idbHandle,
                              const std::vector<CommitSopInfo>& rSopList,
                              std::vector<CommitSopInfo>& rSuccesses,
                              std::vector<CommitSopInfo>& rFailures )
{
    static const char * func = "(findSopInstances)";

    // Iterate over list of SOP instances
    for ( std::vector<const CommitSopInfo>::iterator pos = rSopList.begin();
          pos < rSopList.end(); pos++ )
    {

        // Test whether we have this instance
        if ( haveSopInstance( idbHandle, pos ) )
        {
         ......

Where haveSopInstance is defined as:

static bool haveSopInstance( IDB_HANDLE** idbHandle,
                             const CommitSopInfo* pSopInfo )
{

now, this used to compile fine under g++2.95.3 with its stdc++. I don't see
why it's having difficuly converting the interator to the CommitSopInfo*.

Any ideas?

thanks a lot,

-Anibal


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