Message from discussion
std::vector<boost::xpressive::sregex> fails to compile
Path: g2news1.google.com!postnews.google.com!a32g2000yqm.googlegroups.com!not-for-mail
From: "flewp...@gmail.com" <flewp...@gmail.com>
Newsgroups: gnu.g++.bug
Subject: std::vector<boost::xpressive::sregex> fails to compile
Date: Thu, 21 Jan 2010 14:29:37 -0800 (PST)
Organization: http://groups.google.com
Lines: 43
Message-ID: <03aa042f-d75d-442c-ae32-896afae0edfb@a32g2000yqm.googlegroups.com>
NNTP-Posting-Host: 216.75.232.50
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: posting.google.com 1264112977 6979 127.0.0.1 (21 Jan 2010 22:29:37 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 21 Jan 2010 22:29:37 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: a32g2000yqm.googlegroups.com; posting-host=216.75.232.50;
posting-account=8iYffwoAAADlkMkfxzq1ct675CtDh7e9
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7)
Gecko/20091221 Firefox/3.5.7 (.NET CLR 3.5.30729),gzip(gfe),gzip(gfe)
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