John Maddock | 1 Jul 2002 12:45
Picon

Re: Regex boost_1_28_0 incorrect build / run-time problem

> Hello, I am new to Boost since version 1.27.  I apparently have a
> problem building Regex from Boost 1.28 as I encounter a runtime error
> that causes all the examples to hang.
>
> I was successfully able to run all of the Regex examples except 'partial
> match' under boost 1.27 using Borland BCB5 patch 1.
>
> My procedure for building Regex for both versions 1.27 and 1.28 was to
> run
> Make.exe -fbcb5.mak install clean
> The dlls and libs are then correctly placed in the Builder 5 root
> directory, and the examples build OK.  However, whereas they ran
> successfully for Boost 1.27, they do not run under Boost 1.28.

The examples all work fine for me if I build them from the command line,
however the IDE turns on options -Ve and -Vx by default where as the command
line does not, these options change  binary compatibility and this is the
heart of the problem: the libs you built from the makefile are binary
incompatible with the setting you are (probably) using in the exe.  Now, I
normally prevent this from being an issue by using #pragma option's to
control struct packing etc to ensure binary compatibility whatever options
are set, but for some reason I haven't been able to get this to work
consistently with the -Vx option; in the latest CVS source I've had to
manually pack out one struct to ensure binary compatibility.

BTW the reason this has changed is that 1.28 puts more code in the lib
rather than in the exe.

Finally you can probably fix the problem either by getting the latest cvs
source, or by turning off -Vx in the IDE (zero sized empty members).
(Continue reading)

Peter Dimov | 1 Jul 2002 12:51

Re: boost::shared_ptr and stl algorithms

From: "Bill Eidson" <yg-boost-users <at> gmane.org>
> std::vector< boost::shared_ptr<T> > TVec;
>
> I want to write a function object to run std::for_each. to do somework
> against members of
> T and accumulate results in functor.  My attempts have failed in VC7 with
> memory errors in my operator() method.
>
> struct fo
> {
>     bool operator()( boost::shared_ptr<T>& t )
>    {
>       return true;
>    }
> };

Can you post a complete program that shows the problem? I see nothing wrong
with the snippets above. Perhaps you try to call a member via an empty
shared_ptr?

Info: <http://www.boost.org>
Wiki: <http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl>
Unsubscribe: <mailto:boost-users-unsubscribe <at> yahoogroups.com>

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 

Alexandre Carsac | 1 Jul 2002 16:40
Picon
Favicon

Re: RegEx++ and Visual Studio .NET STL Problems

Perhaps you should try to use STLPort library.
I hope for you it works...since wiki does not
send any report on compatibility with Visual 7.

good luck.  

___________________________________________________________
Do You Yahoo!? -- Une adresse  <at> yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

Info: <http://www.boost.org>
Wiki: <http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl>
Unsubscribe: <mailto:boost-users-unsubscribe <at> yahoogroups.com>

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 

Bruno.Voigt | 2 Jul 2002 01:00
Picon
Favicon

Bruno Voigt/IC3S is out of the office.

I will be out of the office starting  01.07.2002 and will not return until
22.07.2002.

I will respond to your message when I return.
Im back at 22.7.02. Call IC3S at +49.4106.655.0.

Info: <http://www.boost.org>
Wiki: <http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl>
Unsubscribe: <mailto:boost-users-unsubscribe <at> yahoogroups.com>

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 

regexpp | 2 Jul 2002 14:05
Picon

Re: RegEx++ and Visual Studio .NET STL Problems

--- In Boost-Users <at> y..., "john_p_osborn" <john_p_osborn <at> y...> wrote:
> When I upgraded to Visual Studio .NET my programs that use regex++ 
> stopped working.  Many simple calls fail during string destruction 
> with bad heap pointers.  I never had any problems under msvc 
version 
> 6.  Has anyone else experienced this?  Is a problem with the new MS 
> STL?

Nope, but make doubly sure that you are using a shared memory 
allocator, and if your project uses dll's that all the dll's are 
built with the same code generation options (ie the dll runtime).

Hope this helps,

John Maddock

Info: <http://www.boost.org>
Wiki: <http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl>
Unsubscribe: <mailto:boost-users-unsubscribe <at> yahoogroups.com>

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 

Eric Niebler | 2 Jul 2002 08:59
Picon

Re: regex with double byte character sets

On Sun, 30 Jun 2002 04:20:32 -0700, John Maddock wrote:

>> I am currently trying to use the boost regex library with Japanese
>> language strings.  It appears like DBCS is not supported. For example,
>> using the following code (with compile definition of
>> BOOST_REGEX_USE_C_LOCALE) I get the output strings as
>>
>> 0 = "$B!#(B"
>> 1 = "English"
>>
>> Instead of the expected:
>>
>> 0 = "$B$d$f$h$o$r!<!#(B"
>> 1 = "English"
>>
>> This is due to the fact that the Japanese (SJIS encoding) for one of
>> these characters uses the [ character as one of the characters in the
>> encoding.
>>
[snip]
>>
>> Brodie.
> 
> To be honest I know nothing at all about DBCS, but I assumed that very
> code point was represented by *exactly two* characters.  If that's the
> case then I think it might be possible
> 
> 
DBCS encodings like SJIS are variable-width. But the real problem is that
given an iterator into a DBCS string, it is impossible to tell where the
(Continue reading)

Hofi | 2 Jul 2002 09:40
Picon

Re: Regex boost_1_28_0 incorrect build / run-time problem

"Eric Reaburn" <ereaburn <at> data.com.au> wrote in message
news:4473AF479EE7D41198510004AC1D1C738707EC <at> GRACE...
> This looks like a similar problem I had. I'm also using C++ Builder 5
with
> patch 1.
>
> I was using regex from Boost 1.25.0 but when I upgraded to 1.28.0 I got
> run-time errors (specifically bad_alloc). I had no problems compiling
and
> running the test and example programs.
>
> Eventually I discovered that I had to uncomment the following two macros
(in
> user.hpp in boost/regex) and recompile the regex libraries:
>
> // define this if no template instances are to be placed in
> // the library rather than users object files:
> #define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
>
> // define this if the forward declarations in regex_fwd.hpp
> // cause more problems than they are worth:
> #define BOOST_REGEX_NO_FWD
>
> Now everything's just dandy!

Eric you are a life saver!!! I had the same problem, earlier version
worked perfectly, the newest built fine but caused run time error.

Did you find this solution with probing or do you have knowledge of
something?
(Continue reading)

Eric Reaburn | 3 Jul 2002 01:17
Picon

RE: Re: Regex boost_1_28_0 incorrect build / run-t ime problem

I found this solution with much hair-pulling, doc-reading, and, eventually,
header file comparing! :^)

-----Original Message-----
From: Hofi [mailto:yg-boost-users <at> m.gmane.org] 
Sent: Tuesday, 2 July 2002 5:41 PM
To: boost-users <at> yahoogroups.com
Subject: [Boost-Users] Re: Regex boost_1_28_0 incorrect build / run-time
problem

"Eric Reaburn" <ereaburn <at> data.com.au> wrote in message
news:4473AF479EE7D41198510004AC1D1C738707EC <at> GRACE...
> This looks like a similar problem I had. I'm also using C++ Builder 5
with
> patch 1.
>
> I was using regex from Boost 1.25.0 but when I upgraded to 1.28.0 I 
> got run-time errors (specifically bad_alloc). I had no problems 
> compiling
and
> running the test and example programs.
>
> Eventually I discovered that I had to uncomment the following two 
> macros
(in
> user.hpp in boost/regex) and recompile the regex libraries:
>
> // define this if no template instances are to be placed in // the 
> library rather than users object files: #define 
> BOOST_REGEX_NO_EXTERNAL_TEMPLATES
(Continue reading)

Jon Wang | 3 Jul 2002 06:30

ScopeGuard Implementation

Hi,

Recently I've tried to implement Andrei's ScopeGuard (see
http://www.cuj.com/experts/1812/alexandr.htm?topic=experts for details) with boost.function
and boost.bind. Is there anything wrong with it? Thanks for reviewing. 

#include <boost/function.hpp>
#include <boost/bind.hpp>
#include <boost/utility.hpp>
#define ON_BLOCK_EXIT(x) scoped_guard guard##__LINE__(::boost::bind##x)

class scoped_guard: ::boost::noncopyable
{
private:
        typedef const ::boost::function<void> f_type;
		// reference might cause crash

        bool dismissed_;
        f_type f_;
public:
        scoped_guard(f_type& v): f_(v), dismissed_(false) {}
        ~scoped_guard() throw()
        {
                if(!dismissed_)
                   try {f_();}
                   catch(...) {}
        }
        
        void dismiss() throw() { dismissed_ = true; }
};
(Continue reading)

John Maddock | 3 Jul 2002 12:46
Picon

Re: Re: regex with double byte character sets

> DBCS encodings like SJIS are variable-width. But the real problem is that
> given an iterator into a DBCS string, it is impossible to tell where the
> previous character starts without walking back to the beginning of the
> string. So you can really only make a forward DBCS iterator, not a
> bidirectional one.  And I think regex++ requires bidirectional iterators,
> right John?

Yes that's right, obviously my understanding of DBCS strings was flawed.

John Maddock
http://ourworld.compuserve.com/homepages/john_maddock/index.htm

Info: <http://www.boost.org>
Wiki: <http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl>
Unsubscribe: <mailto:boost-users-unsubscribe <at> yahoogroups.com>

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 


Gmane