james.jones | 1 Nov 01:01
Favicon

Re: [Boost.Parameter] How to Use Named Parameters in a Class Hierarchy?

From: "Wu Yinghui, Freddie" <yhwu <at> volumeinteractions.com>
> To use the class hierarchy, my program loads the DLL requested by user
> using LoadLibrary() (We're using Windows, but it should be similar to
> Linux, I suppose), and makes use of the Derived1/Derived2 classes via a
> pointer to the Base class.
> 
> Since I have no information about the derived classes when building my
> main executable (only Base class is known then), I cannot make direct
> use of Derived1/Derived2 types in my main program. -- Yet, I need a way
> to provide some arbitrary set of arguments to the derived classes.
> 
> Hope my explanation clears your doubts. Do you have any suggestion or
> alternative design in mind?

Try a single boost::any parameter. Then pass structures as needed. This is essentially equivalent to the
void* method everyone used in the bad old pre-Boost days, but it's type-safe.

-
James Jones             Administrative Data Mgmt.
Webmaster               375 Raritan Center Pkwy, Suite A
Data Architect          Edison, NJ 08837
kongko kongko | 1 Nov 08:04
Picon

Error when build boost using GCC on AIX, "stdint.h not exist"

   Hi,I want to install boost 1.33.1 on PowerPC AIX 5.1,my complier is GCC 
4.0.1.
   This error occure:
   "/boost_1_33_1/boost/cstdint.hpp:42:23: error: stdint.h: A file or 
directory in the path name does not exist."
   I have can't find stdint.h in my system,Does anybody has the same 
problem?How can i solve it ?
   Thanks a lot.

_________________________________________________________________
免费下载 MSN Explorer:   http://explorer.msn.com/lccn/  

_______________________________________________
Boost-users mailing list
Boost-users <at> lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Picon
Favicon

Re: Any interest in a separate Boost.TR1 release/download?

John Maddock wrote:
> I wonder if people would find a separate download for the Boost TR1
> components useful ?

Yes, that would be very useful. Especially for those of us building on 
many platforms with lawyers to deal with.
Andrea Carbone | 1 Nov 15:01
Picon
Favicon

[property_tree] Why I get such a big Lib?

Hello,

I am working on a little class using the property_tree lib.
MSVC 7.1, boost 1.33.1 and latest property_tree cvs from sandbox.

I have simply Pimpled the boost::property_tree::ptree class and
implemented a templated get<> to extract values from a conf file ...

I don't know if it is fair to attach files to the mail so I just paste
the header...

Here the interface:

#ifndef xml_config_t_H_INCLUDED
#define xml_config_t_H_INCLUDED
//---------------------------------------------------------------------
#include <string>
#include <memory>
//---------------------------------------------------------------------
//just tags ...
namespace all { namespace core{

    namespace detail
        {
        struct xml_t{};
        struct ini_t{};
        }
    static const core::detail::xml_t xml = core::detail::xml_t();
    static const core::detail::ini_t ini = core::detail::ini_t();
    }}
(Continue reading)

Andrea Carbone | 1 Nov 15:55
Picon
Favicon

Re: [property_tree] Why I get such a big Lib?


> But the problem is that Compiling the class as a static lib, produces an
> huge library (~14 MB !!).

Correction: 24 MB ...

> 
> I am compiling wiht /MT flag .. RTTI is off and there are just default
> settings ...

Forgot to mention ... in Release mode ...
David Walthall | 1 Nov 18:02

Re: boost filesystem

Aubrey, Jason wrote:
> Hi,
> 
> When I run the following program it runs successfully but throws an
> exception during shutdown.  I don't know why, but it seems that the call
> to boost::filesystem::file_size() is corrupting memory somehow.  This
> example only shows the call to file_size() but I think I've seen similar
> trouble with other calls within boost::filesystem.  
> 
> Am I doing something wrong here or is this a bug?
> 
> Regards,
> Jason Aubrey

Jason,

When something like this happens, I have a function that checks all of 
the heap for corruption errors.  If you place enough calls to this 
function, you can use it to find where the corruption happens.

David

#include <malloc.h>
#include <stdlib.h>

// HeapCheckWin32()
// ----------------
// Sends an output to the TRACE() function with the
// status of the heap.  (Actually, it seems to hit
// an assert inside of _heapwalk when there is an error.)
(Continue reading)

Aubrey, Jason | 1 Nov 18:18
Favicon

Re: boost filesystem

Thanks David.  I'll probably be tied up on other issues for 1-3 days but
I will give this a try when I can. 

Regards,
Jason

-----Original Message-----
From: boost-users-bounces <at> lists.boost.org
[mailto:boost-users-bounces <at> lists.boost.org] On Behalf Of David Walthall
Sent: Wednesday, November 01, 2006 11:03 AM
To: boost-users <at> lists.boost.org
Subject: Re: [Boost-users] boost filesystem

Aubrey, Jason wrote:
> Hi,
> 
> When I run the following program it runs successfully but throws an 
> exception during shutdown.  I don't know why, but it seems that the 
> call to boost::filesystem::file_size() is corrupting memory somehow.  
> This example only shows the call to file_size() but I think I've seen 
> similar trouble with other calls within boost::filesystem.
> 
> Am I doing something wrong here or is this a bug?
> 
> Regards,
> Jason Aubrey

Jason,

When something like this happens, I have a function that checks all of
(Continue reading)

Johan Råde | 1 Nov 18:46
Picon
Picon

Re: [boost.serialization] serialization crash

Robert Ramey wrote:
> Johan Råde wrote:
> 
>>> But no one has been motivated to actually do this so far.
>> I'm working on such facets still for handling non-finite floating  point numbers.
> Sorry, I should have mentioned this.  I had thought that the idea
> of trapping the undefined behavior was abandoned for lack of
> interest.  

There was no lack of interest.
You were interested, and that suffices.

> I'm glad to see I was wrong about this.  I looks like you might want to include bools in this as well.

That would be trivial, just a few lines of code.
(IMHO  serializing an initialized bool is a very very bad idea,
but if it is of use to anyone, why not allow it to be done safely.)
All that is needed is a facet derived from std::num_put
with a virtual function like this:

   ... my_num_put::do_put(..., bool b)
   {
     if(b)
       b = true;
     else
       b = false;
     std::num_put::do_put(..., b);
   }

This will replace an uninitialized bool with an unspecified
(Continue reading)

Jeff Garland | 1 Nov 19:14

Re: microsec_clock not recognized in VC8

Cheng, Victor S wrote:
>> I'm using 1.33.1 date_time library, but ran into a problem with
>> microsec_clock. It's not recognized in VC8:
>>
>> 	error C2653: 'microsec_clock' : is not a class or namespace name
>>
>> If I change it to second_clock, then it's fine. Is this a known
>> problem for VC8?
>>
> ---- Here is my test code --------
> #include "boost/date_time/posix_time/posix_time.hpp"
> #include <iostream>
> int main() {
>     using namespace boost::posix_time;
>     using namespace boost::gregorian;
>     ptime now = microsec_clock::local_time();
> //second_clock::local_time();
> 	...
> }

I have no idea what's wrong here and I'm not aware of any issues on vc8.  In 
fact, it passes regression tests for vc8.  The only thing I can think is a 
busted include path, but then I don't know why the second_clock would work.

> ----- Here is how I built the library ----
> "C:\Program Files\Microsoft Visual Studio 8"\vc\bin\vcvars32.bat
> c:
> cd \dev\boost_1_33_1
> bjam -sTOOLS=vc-8_0 --prefix=C:\Dev\Boost --without-python
> --builddir=build install
(Continue reading)

Sohail Somani | 1 Nov 20:05

Thread pool

Hi,

Does Boost have any thread-pooling classes? I'm thinking something that
allows you to weight tasks perhaps by expected computational time or
other random things. If not, can someone generously point me to some?
Preferably some that work with boost threads. I've found
http://threadpool.sf.net and I am currently looking at it.

Thanks,

Sohail

Gmane