Opened 13 years ago
Closed 13 years ago
#3855 closed Bugs (duplicate)
Xpressive sregex vector fails to compile with gcc 3.4, 4.1
Reported by: | Owned by: | Eric Niebler | |
---|---|---|---|
Milestone: | Boost 1.42.0 | Component: | xpressive |
Version: | Boost 1.40.0 | Severity: | Problem |
Keywords: | xpressive sregex vector | Cc: |
Description
Hi
I'm trying to use a vector of Boost Xpressive sregex objects. My code 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;
}
VS2005 compiles my code successfully, but gcc 3.4.5 and 4.1.2 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>)'
Rgds
Paul Flew
Dupe of #3712. Fixed on trunk and release, will be part of 1.42.