bug-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

std::vector<boost::xpressive::sregex> fails to compile


From: address@hidden
Subject: std::vector<boost::xpressive::sregex> fails to compile
Date: Thu, 21 Jan 2010 14:29:37 -0800 (PST)
User-agent: G2/1.0

Hi

I'm trying to use a vector of Boost Xpressive sregex objects. VS2005
compiles my code successfully, but gcc 3.4 and 4.1 fail with:

<path>/include/c++/3.4.5/bits/stl_construct.h: In function `void
std::__destroy_aux(_ForwardIterator, _ForwardIterator, __false_type)
[with _ForwardIterator = boost::xpressive::sregex*]':
<path>/include/c++/3.4.5/bits/stl_construct.h:152:   instantiated from
`void std::_Destroy(_ForwardIterator, _ForwardIterator) [with
_ForwardIterator = boost::xpressive::sregex*]'
<path>/include/c++/3.4.5/bits/stl_vector.h:256:   instantiated from
`std::vector<_Tp, _Alloc>::~vector() [with _Tp =
boost::xpressive::sregex, _Alloc =
std::allocator<boost::xpressive::sregex>]'
..\test.cpp:9:   instantiated from here
<path>/include/c++/3.4.5/bits/stl_construct.h:120: 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>)'

The code to generate this is:

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

using namespace std;
using namespace boost::xpressive;

int main(int argc, char* argv[])
{
        vector<sregex> vec;
        return 0;
}

Appreciate any feedback on solve this problem.

Rgds


Paul Flew


reply via email to

[Prev in Thread] Current Thread [Next in Thread]