Boost logo

Boost Users :

Subject: [Boost-users] xpressive compilation error
From: Pablo Hernández Valdés (pabloh_at_[hidden])
Date: 2009-12-02 10:36:33


Hello,

I used to had an old version of boost (I don't remember exactly which) and
my code worked fine. Now I updated to the last version and I started to
receive compilation errors in linux when using a std::vector with regular
expressions from boost::xpressive, in windows it compiles fine.
This code doesn't compile:

#include <vector>
#include <boost/xpressive/xpressive.hpp>

typedef boost::xpressive::basic_regex<std::string::const_iterator> regex_t;

int main(int argc, char* argv[])
{
        std::vector<regex_t> vector;
        vect.push_back(regex_t());
        
        return 0;
}

Compiler output:

cd '/home/segurmatica/console_filter/debug' && WANT_AUTOCONF_2_5="1"
WANT_AUTOMAKE_1_6="1" LC_MESSAGES="C" LC_CTYPE="C" gmake -k
gmake all-recursive
Making all in src
compiling console_filter.cpp (g++)
In file included from
/usr/local/lib/gcc/i686-pc-linux-gnu/4.4.2/../../../../include/c++/4.4.2/vector:63,
from /home/segurmatica/console_filter/src/console_filter.cpp:1:
/usr/local/lib/gcc/i686-pc-linux-gnu/4.4.2/../../../../include/c++/4.4.2/bits/stl_construct.h:
In static member function 'static void std::_Destroy_aux<<anonymous>
>::__destroy(_ForwardIterator, _ForwardIterator) [with _ForwardIterator =
boost::xpressive::basic_regex<__gnu_cxx::__normal_iterator<const char*,
std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >*,
bool <anonymous> = false]':
/usr/local/lib/gcc/i686-pc-linux-gnu/4.4.2/../../../../include/c++/4.4.2/bits/stl_construct.h:116:
instantiated from 'void std::_Destroy(_ForwardIterator, _ForwardIterator)
[with _ForwardIterator =
boost::xpressive::basic_regex<__gnu_cxx::__normal_iterator<const char*,
std::basic_string<char, std::char_traits<char>, std::allocator<char> > >
>*]'
/usr/local/lib/gcc/i686-pc-linux-gnu/4.4.2/../../../../include/c++/4.4.2/bits/stl_construct.h:142:
instantiated from 'void std::_Destroy(_ForwardIterator, _ForwardIterator,
std::allocator<_T2>&) [with _ForwardIterator =
boost::xpressive::basic_regex<__gnu_cxx::__normal_iterator<const char*,
std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >*,
_Tp = boost::xpressive::basic_regex<__gnu_cxx::__normal_iterator<const
char*, std::basic_string<char, std::char_traits<char>, std::allocator<char>
> > >]'
/usr/local/lib/gcc/i686-pc-linux-gnu/4.4.2/../../../../include/c++/4.4.2/bits/stl_vector.h:313:
instantiated from 'std::vector<_Tp, _Alloc>::~vector() [with _Tp =
boost::xpressive::basic_regex<__gnu_cxx::__normal_iterator<const char*,
std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >,
_Alloc =
std::allocator<boost::xpressive::basic_regex<__gnu_cxx::__normal_iterator<const
char*, std::basic_string<char, std::char_traits<char>, std::allocator<char>
> > > >]'
/home/segurmatica/console_filter/src/console_filter.cpp:8: instantiated from
here
/usr/local/lib/gcc/i686-pc-linux-gnu/4.4.2/../../../../include/c++/4.4.2/bits/stl_construct.h:93:
error: no matching function for call to '_Destroy(const
boost::proto::exprns_::expr<boost::proto::tag::address_of,
boost::proto::argsns_::list1<boost::xpressive::basic_regex<__gnu_cxx::__normal_iterator<const
char*, std::basic_string<char, std::char_traits<char>, std::allocator<char>
> > >&>, 1l>)'
gmake[2]: *** [console_filter.o] Error 1
gmake[2]: Target `all' not remade because of errors.
gmake[2]: Nothing to be done for `all-am'.
gmake[1]: *** [all-recursive] Error 1
gmake: *** [all] Error 2
*** Exited with status: 2 ***

I'm using gcc 4.4.2 and boost 1.41

Thanks in advance,
Pablo

-- 
View this message in context: http://old.nabble.com/xpressive-compilation-error-tp26609113p26609113.html
Sent from the Boost - Users mailing list archive at Nabble.com.

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