Sascha Friedmann | 1 Sep 01:12
Picon

[boost::serialization]assertion in basic_iarchive.cpp

Hello,
when loading my application's state from a text file I get sometimes 
this assertion:

Assertion failed: object_id_vector[i].adress >= old_adress, file 
../src/basic_iarchive.cpp

It's very strange because sometimes this assertion is triggered and 
sometimes not.
What exactly does this assertion mean?

Thanks.

Sascha Friedmann
kingos | 1 Sep 04:51
Picon

Date calculations with exclusions


Hi, 

I am hoping to use boost::date_time to do some date calculations. What I want to do is
basically work out the number of days to a given date with various exclusions applied.

eg.

How many working days are there to christmas?

using namespace boost::gregorian;

int CalculateDaysToChristmas()
{
	date_period someHoliday(date(2006, Dec, 01), date_duration(1));

    date today(2006, Sep, 1);

    date christmas(2006, Dec, 25);

    int days = 0;
    for (day_iterator i = today; i != christmas; ++i)
    {
        if (is_weekday(*i) && !someHoliday.contains(*i))
            ++days;
    }

    return days;
}

(Continue reading)

Robert Ramey | 1 Sep 07:06

Re: [boost::serialization]assertion in basic_iarchive.cpp

This means there is a bug in the serialization library.

The question is - what is triggering this bug.

So it would be interesting to know more information:

version of boost
compiler
operating system

Do we know for a a fact that the archive file has not been edited or 
corrupted.

Do we know for a fact that the serialization code hasn't been changed - 
including
different serialization traits for any types - since the archive was 
created?

Any other information.

Robert Ramey

Sascha Friedmann wrote:
> Hello,
> when loading my application's state from a text file I get sometimes
> this assertion:
>
> Assertion failed: object_id_vector[i].adress >= old_adress, file
> ../src/basic_iarchive.cpp
>
(Continue reading)

Hughes, James | 1 Sep 09:24
Picon

Re: Too stupid to install Boost

VC6 might be too early a compiler to support some of the stuff regex
uses (i.e. its non-compliant for some template C++ features)....Does it
work with a later compiler??

James 

> -----Original Message-----
> From: boost-users-bounces <at> lists.boost.org 
> [mailto:boost-users-bounces <at> lists.boost.org] On Behalf Of Thomas
> Sent: 31 August 2006 15:19
> To: boost-users <at> lists.boost.org
> Subject: [Boost-users] Too stupid to install Boost
> 
> Hi,
> I would like to use the Boost RegEx Library. Somehow I failed 
> installing it (WinXP, VC6). Is there a step by step 
> instruction to get boost running under this configuration?
> The steps I took so far:
> 1) Set the MSDevDir and MSVCDir EnvVars by hand.
> 2) Compiled BJam and copied it to the boost root.
> 3) Execute   bjam "-sTOOLS msvc" install
> 4) Set the path for include files and libraries in 
> Tools->Options->Directories to the folder I unzipped Boost to.
> 
> Got the following error messages while trying to compile a 
> simple regex example :(
> 
> Thanks in advance,
> Thomas
> 
(Continue reading)

John Maddock | 1 Sep 10:58
Picon

Re: Too stupid to install Boost

Thomas wrote:
> Hi,
> I would like to use the Boost RegEx Library. Somehow I failed
> installing
> it (WinXP, VC6). Is there a step by step instruction to get boost
> running under this configuration?
> The steps I took so far:
> 1) Set the MSDevDir and MSVCDir EnvVars by hand.

Why not call the vcvars32.bat file to do it for you?

> 2) Compiled BJam and copied it to the boost root.
> 3) Execute   bjam "-sTOOLS msvc" install

Should be bjam -sTOOLS=msvc install

But if the library built OK, then don't worry.

> 4) Set the path for include files and libraries in
> Tools->Options->Directories to the folder I unzipped Boost to.
>
> Got the following error messages while trying to compile a simple
> regex example :(

I've never seen anything like those messages before.  The regex lib most 
certainly does work with VC6 as well!

Can I suggest you try compiling one of the example programs that comes with 
regex?  Also make sure you're using the default VC6 build options to begin 
with: it shouldn't matter one jot what options you use, but I can't rule out 
(Continue reading)

John Maddock | 1 Sep 11:03
Picon

Re: Too stupid to install Boost

Hughes, James wrote:
> VC6 might be too early a compiler to support some of the stuff regex
> uses (i.e. its non-compliant for some template C++ features)....Does
> it work with a later compiler??

No it works just fine with VC6 onwards.  I've never seen or heard of errors 
like that before, but nothing surprises me with that compiler.

Oh wait, this is patched VC6 isn't it?  Not some original unpatched install 
straight off the CD?  There are all kinds of bugs fixed in the various 
service releases.

Just thinking out loud,

John. 
Sascha Seewald | 1 Sep 14:22
Picon

[asio] how to check connection state

Hi boosters!

I've written a simple client-server example using 
boost::asio::ip::tcp::socket. I establish the connection using 
socket::connect() and close it using socket::close().

But how can I determine the current state of connection (Am I still 
connected or not?)

Is it sufficient to check whether the socket is open? Is there a 
function socket::is_open()?

Or do I have to track errors for disconnection events and set some 
is_connected-flag somewhere.

Btw what is the purpose of the keep_alive socket option?

Thanks in advance

Sascha
Sascha Friedmann | 1 Sep 11:06
Picon

Re: [boost::serialization]assertion in basic_iarchive.cpp

Robert Ramey wrote:
> This means there is a bug in the serialization library.
> 
> The question is - what is triggering this bug.
> 
> So it would be interesting to know more information:
> 
> version of boost
The boost version is 1.33 in the version.hpp the BOOST_VERSION is 
defined as 103300.
> compiler
The compiler is vc7.1
> operating system
The operating system is Microsoft Windows XP Service Pack2.
> 
> Do we know for a a fact that the archive file has not been edited or 
> corrupted.
It has not been edited and for corrupting I'm sure that it has not been 
corrupted (is there a way to recognize corruption of a text archive?).
> 
> Do we know for a fact that the serialization code hasn't been changed - 
> including
> different serialization traits for any types - since the archive was 
> created?
I did not change anything. The archive is created and then I reload it 
immediately (of course after closing the file). And approximately it 
works 3 of 5 times, when running the program 5times (without rebuild).
The old archive is always deleted when creating the new one.
> 
> Any other information.
(Continue reading)

Picon

Re: [Boost.Test] how to get current test outcomefromwithin test case

On 8/23/06, Gennadiy Rozental <gennadiy.rozental <at> thomson.com> wrote:
>
> "Pierre-Jules Tremblay" <iamtrep <at> gmail.com> wrote in message
> news:4590bfef0608230550s5de6f427j45d531fbe6090cbd <at> mail.gmail.com...
> > Well.. in general, not that often, I suppose.
> >
> > In our augmented version of your test framework, I've implemented
> > fairly sophisticated logic to catch memory leaks on a per-test-case
> > basis.
>
> Would you be interrested t oshare it with us if it's generic enough?

I've been thinking about that.  At the moment, it's not possible
because much of the code depends on a proprietary heap management
library.   However I think it should be possible to abstract that out.
 Perhaps it would be useful if it could at least make use of
Microsoft's debug CRT functions?

I'll let you know if I get anywhere with generalizing the memory-leak
finding code.

>
> > In the results accounting, I need to know whether a test
> > failed because of a memory leak or because it failed a predicate
> > check.
> >
> > Come to think of it, perhaps this belongs more as an FAQ item for the
> > documentation rather than a tool proper.
>
> Ok.
(Continue reading)

james.jones | 1 Sep 17:23
Favicon

Re: Date calculations with exclusions

From: kingos <at> optusnet.com.au
> Hi, 
> 
> I am hoping to use boost::date_time to do some date calculations. What I want to do is
> basically work out the number of days to a given date with various exclusions applied.
> 
> eg.
> 
> How many working days are there to christmas?
> 
> using namespace boost::gregorian;
> 
> int CalculateDaysToChristmas()
> {
> 	date_period someHoliday(date(2006, Dec, 01), date_duration(1));
> 
>     date today(2006, Sep, 1);
> 
>     date christmas(2006, Dec, 25);
> 
>     int days = 0;
>     for (day_iterator i = today; i != christmas; ++i)
>     {
>         if (is_weekday(*i) && !someHoliday.contains(*i))
>             ++days;
>     }
> 
>     return days;
> }
> 
(Continue reading)


Gmane