From: Miko Nahum (miko_at_[hidden])
Date: 2005-11-14 05:50:48
Thanks John. Your answer helped us great deal. I have removed the
allocator stuff and problem solved.
Concerning the 'collate' issue, still considering if to make changes to
[mailto:boost-bounces_at_[hidden]] On Behalf Of John Maddock
Sent: Thursday, November 10, 2005 1:05 PM
Subject: Re: [boost] Compilation problems on VC7 of code uses boost
> We have the following piece of code that uses boost (copy/paste):
I'm afraid I don't have a copy of 1.31 lying around anymore, but your
problems are almost certainly allocator related. Can you remove the
allocator related code? As it stands your code doesn't actually "do"
anything. Or or you actually using a custom allocator?
As for the HP aCC problem: it's very similar to one that occurs with VC7
when there's a "using namespace std;" declaration before including
the compiler is then unable to differentiate between std::collate (the
template) and boost::collate (the constant), and it's a compiler bug.
Otherwise your workaround is as good as any I guess.
Are you in a position to upgrade to Boost-1.33.1 ?
The bad news is that your code as it stands will likely need some
porting to make the change (reg_expression has been deprecated in favour
of basic_regex for example, but the typedefs like boost::regex
boost::wregex etc are all the same). The good news is that the regex
matching code has been substantially re-written to be much faster, and
hardly does any memory allocation at all (or even none at all under
ideal conditions), so custom allocators are very much a thing of the
It would simplify your code to:
using namespace boost;
using namespace std;
typedef boost::regex re_type;
long example_func(long pos, const std::string& regE, long& reslen, long
boost::match_results <PData::iterator> m;
e.assign (regE, regbase::normal);
if (regex_search (begin (), end (), m, e, match_not_dot_newline |
res = pos + m.position();
reslen = m.length();
Sorry I can't be more helpful about this: diagnosing these kinds of deep
template instantiation errors are next to impossible sometimes, but are
almost always errors in the template argument list.
Hope this helps a little at least,
Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk