[boost] Standard interface for adaptable function objects?

2002-11-22 Thread Anthony Williams
David Abrahams writes: Do we have any precedent for ways to find out what the arity and argument types of an arbitrary function object is (I'm not talking about function pointers, here, but functors)? Given that a functor might support more than one argument set, the only way I can think

[boost] pointer to member

2002-11-22 Thread Anthony Williams
Martin Bosticky writes: Does anybody know if it is possible to extract a class type from a pointer-to-member type/object? ie if i have templateclass pointer_to_member_type void foo(pointer_to_member_type AMember) { ... //? can i figure out here what the type is for the object

[boost] Implicit conversions in dynamic_any / extract

2002-11-22 Thread Remy Blank
Hello Boosters, I am trying to use dynamic_any to store either objects or pointers to (polymorphic) objects. I am able to extract a pointer to the base class of a contained object: class B { }; class D: public B { }; void Test() { any d(D()); B* pb = extractB(d); } This is

[boost] Continuations (was: tandard interface for adaptable function objects?)

2002-11-22 Thread Miroslav Silovic
Anthony Williams wrote: Given that a functor might support more than one argument set, the only way I can think of is to say do you support this argument set? rather than what argument set do you accept?; in which case you can use the mechanism implemented in boost.lambda, and in my function

Re: [boost] ublas regression test problems

2002-11-22 Thread Joerg Walter
- Original Message - From: Aleksey Gurtovoy [EMAIL PROTECTED] To: 'Boost mailing list' [EMAIL PROTECTED] Sent: Thursday, November 21, 2002 9:57 AM Subject: RE: [boost] ublas regression test problems Joerg Walter wrote: OK. The mpl::if_ problem vanished, the remaining problems with

[boost] intrusive_ptr ?

2002-11-22 Thread Christophe Meessen
Hello, the shared_ptr pages (.hpp) are apprently not accessible any more from www.boost.org. I was looking for some documentation on using intrusive_ptr but they are apparently not documented. Looking at the header files I got some hints how to use them. Why are the intrusive_ptr not

Re: [boost] implicit_cast

2002-11-22 Thread Peter Dimov
From: David Abrahams [EMAIL PROTECTED] Here's what I think might be a correct implementation: template class T, class U T implicit_cast(U const x) { return x; } template class T, class U T implicit_cast(U x) { return x; } The correct implementation IIRC is templateclass T T

[boost] Re: [Jason Shirk jasonsh@microsoft.com]boost\dynamic_bitset.hppneeds update for Everett

2002-11-22 Thread Gennaro Prota
On Wed, 20 Nov 2002 16:34:50 -0500, David Abrahams [EMAIL PROTECTED] wrote: I just checked CVS, and boost\dynamic_bitset.hpp needs a change to avoid a warning with Everett: Here is the patch: 50c50 #ifdef BOOST_MSVC --- #if (BOOST_MSVC = 1300) It's worth remembering that Microsoft's are

Re: [boost] Do we need a boost_exception class or idiom?

2002-11-22 Thread Peter Dimov
From: William E. Kempf [EMAIL PROTECTED] Peter Dimov said: I see, ambiguous usage of user. Let's rephrase: in most cases the what() string is supplied by the throw point, not the catch point, right? I.e. library authors decide what to return from what(), library users do not. Except

Re: [boost] Do we need a boost_exception class or idiom?

2002-11-22 Thread Peter Dimov
From: David Bergman [EMAIL PROTECTED] I have always interpreted non-localized as comprehensible to some 60% of scientifically inclined Americans ;-) Looks like a joke but hides a relevant point. Sometimes you need to localize to plain (nontechnical) English, too.

Re: [boost] Implicit conversions in dynamic_any / extract

2002-11-22 Thread David Abrahams
Remy Blank [EMAIL PROTECTED] writes: Hello Boosters, I am trying to use dynamic_any to store either objects or pointers to (polymorphic) objects. I am able to extract a pointer to the base class of a contained object: class B { }; class D: public B { }; void Test() { any

Re: [boost] Standard interface for adaptable function objects?

2002-11-22 Thread Anthony Williams
David Abrahams writes: Anthony Williams [EMAIL PROTECTED] writes: David Abrahams writes: Do we have any precedent for ways to find out what the arity and argument types of an arbitrary function object is (I'm not talking about function pointers, here, but functors)?

[boost] Re: Implicit conversions in dynamic_any / extract

2002-11-22 Thread Remy Blank
On Fri, 22 Nov 2002 07:17:24 -0500, David Abrahams [EMAIL PROTECTED] wrote: Remy Blank [EMAIL PROTECTED] writes: Hello Boosters, I am trying to use dynamic_any to store either objects or pointers to (polymorphic) objects. I am able to extract a pointer to the base class of a

Re: [boost] Serialization XML (was Serialization Library

2002-11-22 Thread Wesley W. Terpstra
Since no-one seemed to notice my prior post which I think addressed some of these issues; I am reattaching it here. On Thu, Nov 21, 2002 at 07:45:55AM -0800, Robert Ramey wrote: My question is whether XML can capture an arbitrary C++ structure in a meaningful and useful way. So far no one has

Re: [boost] functor adapter

2002-11-22 Thread Peter Dimov
From: Martin Bosticky [EMAIL PROTECTED] [...] Example: struct Option { string m_Name; string m_OptionParameters; }; vectorOption AVector_vec; ... // Find the preffered option vectorOption::iterator AVector_it = find_if ( AVector.begin(), AVector.end(),

[boost] Re: Formal Review Request: class optional

2002-11-22 Thread Dirk Gerrits
Fernando Cacciola wrote: Dirk Gerrits wrote in message arjgo5$o25$[EMAIL PROTECTED]">news:arjgo5$o25$[EMAIL PROTECTED]... Fernando Cacciola wrote: [snip] void recieve_async_message() { optional rcv ; while ( !!(rcv = get_async_input()) !timeout() ) output(*rcv); } [snip] Maybe

RE: [boost] BOOST_CHECK_EQUAL() dangers

2002-11-22 Thread Chris Parsons
From: Alisdair Meredith Gennadiy Rozental wrote: In majority of the cases when user is comparing two character pointers he need namely string comparison. Requiring to cast both sides to std::string is a big burden IMO. So I would choose solution 2. Could we not go with option

[boost] Re: functor adapter

2002-11-22 Thread Martin Bosticky
Thanks wery much for both commets, Douglas and Peter I will have a look at bind and lambda libraries but i remember i had trouble using the lambda library under VC6 together with bind1st Martin. ___ Unsubscribe other changes:

Re: [boost] Re: Implicit conversions in dynamic_any / extract

2002-11-22 Thread David Abrahams
Remy Blank [EMAIL PROTECTED] writes: But there has to be a better way, hasn't it? Yes**. The mechanism in Boost.Python allows you to register just the relationships between adjacent base and derived classes, and it fills in the rest of the graph. Maybe it's time to refactor this code for

Re: [boost] Re: Formal Review Request: class optional

2002-11-22 Thread Fernando Cacciola
- Original Message - From: Dirk Gerrits [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 22, 2002 12:36 PM Subject: [boost] Re: Formal Review Request: class optional [snipped] I guess I'd use if (peek(opt) != 0) or something. It's not that !! is so ugly, but

[boost] Re: Formal Review Request: class optional

2002-11-22 Thread Vincent Finn
Hi, I have one comment and one question. So first the comment I was recently thinking about a similar thing for a slightly different purpose. You seem to concentrate on option return values, what about optional arguments. e.g. void fn(int iImportant, optionalint iNotImportant =

[boost] Re: implicit_cast

2002-11-22 Thread Gennaro Prota
On Fri, 22 Nov 2002 13:48:01 +0200, Peter Dimov [EMAIL PROTECTED] wrote: From: David Abrahams [EMAIL PROTECTED] Here's what I think might be a correct implementation: template class T, class U T implicit_cast(U const x) { return x; } template class T, class U T implicit_cast(U x) {

[boost] Re: New smart pointer library feature: debug hooks

2002-11-22 Thread David B. Held
Peter Dimov [EMAIL PROTECTED] wrote in message 00e101c29161$c6f16800$1d00a8c0@pdimov2">news:00e101c29161$c6f16800$1d00a8c0@pdimov2... When the macro BOOST_ENABLE_SP_DEBUG_HOOKS is defined, the Boost smart pointers will call the following debug hook routines: [...] Do you need this

Re: [boost] Re: New smart pointer library feature: debug hooks

2002-11-22 Thread Peter Dimov
From: David B. Held [EMAIL PROTECTED] Peter Dimov [EMAIL PROTECTED] wrote in message 00e101c29161$c6f16800$1d00a8c0@pdimov2">news:00e101c29161$c6f16800$1d00a8c0@pdimov2... When the macro BOOST_ENABLE_SP_DEBUG_HOOKS is defined, the Boost smart pointers will call the following debug hook

[boost] Re: Re: Implicit conversions in dynamic_any / extract

2002-11-22 Thread Remy Blank
On Fri, 22 Nov 2002 11:10:19 -0500, David Abrahams [EMAIL PROTECTED] wrote: Remy Blank [EMAIL PROTECTED] writes: I have looked at Boost.Python, and it is very similar to what I had in mind. Would it be possible to make Boost.Python more general to describe C++ class information for runtime

Re: [boost] Re: Formal Review Request: class optional

2002-11-22 Thread Fernando Cacciola
- Original Message - From: Vincent Finn [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 22, 2002 1:38 PM Subject: [boost] Re: Formal Review Request: class optional Hi, I have one comment and one question. So first the comment I was recently thinking about a similar

RE: [boost] Do we need a boost_exception class or idiom?

2002-11-22 Thread David Bergman
Peter, It unfortunately reveals my true semantics of non-localized... I am getting better at internationalizing, though, which definitely should include your point, of mundanizing. In the argument about the what() between you, Dave and Bill, I must say that what() should reveal something

[boost] Re: Formal Review Request: class optional

2002-11-22 Thread Dirk Gerrits
Fernando Cacciola wrote: - Original Message - From: Dirk Gerrits To: Sent: Friday, November 22, 2002 12:36 PM Subject: [boost] Re: Formal Review Request: class optional [snipped] I guess I'd use if (peek(opt) != 0) or something. It's not that !! is so ugly, but it's not very clear

RE: [boost] Standard interface for adaptable function objects?

2002-11-22 Thread David Bergman
In general, accomplishing the mapping Dave sought seems to be a game of traversing alternative argument sets, properly embedded in template definitions, such as in Boost.Lambda. The problem would then be reduced (converted is a better word, since the resultant problem is not exactly simple...) to

Re: [boost] String algorithm library

2002-11-22 Thread Pavol Droba
Hi, This message is mostly for people who are interested in the string algorithm library. New version is in the sandbox. I have redesigned major part of the library, and I think that now its structure is in quite stable state. I want to start writing the documentation, but first I'd like to be

RE: [boost] boost::pool feature requests

2002-11-22 Thread scleary
-Original Message- From: Alberto Barbati [mailto:[EMAIL PROTECTED]] 1) purge_memory() does not reset the member next_size Yes, this is in fact a bug, and it will be fixed. 2) the name release_memory() confuses me. It makes me think that all memory is being released, a task

Re: [boost] Re: functor adapter

2002-11-22 Thread Douglas Gregor
On Friday 22 November 2002 10:53 am, Martin Bosticky wrote: Thanks wery much for both commets, Douglas and Peter I will have a look at bind and lambda libraries but i remember i had trouble using the lambda library under VC6 together with bind1st Martin. Bind will work on VC6, Lambda will

RE: [boost] Re: Formal Review Request: class optional

2002-11-22 Thread Rozental, Gennadiy
Good point. On a few ocasions I have use optional to pass optional parameters. However, I've came to the following: Take you example for instance: void fn(int iImportant, optionalint iNotImportant = optionalint()) { if ( !!iNotImportant ) { // not important argument recieved,

[boost] Re: Do we need a boost_exception class or idiom?

2002-11-22 Thread David B. Held
Peter Dimov wrote: [...] My answer is that specifying the precise semantics of what() for every documented exception type is a necessary prerequisite. (Implies that the standard needs to be fixed, too.) [...] Would it be worthwhile to define a different member function (possibly in a

Re: [boost] Re: Formal Review Request: class optional

2002-11-22 Thread Fernando Cacciola
- Original Message - From: Vincent Finn [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 22, 2002 1:38 PM Subject: [boost] Re: Formal Review Request: class optional And now the question can this be used with VC6 ? Yes :-)) I've uploaded the new version which compiles

[boost] Re: Do we need a boost_exception class or idiom?

2002-11-22 Thread David B. Held
Peter Dimov wrote: From: David B. Held Peter Dimov wrote: My answer is that specifying the precise semantics of what() for every documented exception type is a necessary prerequisite. (Implies that the standard needs to be fixed, too.) Would it be worthwhile to define a different member

Re: [boost] Re: Do we need a boost_exception class or idiom?

2002-11-22 Thread Peter Dimov
From: David B. Held [EMAIL PROTECTED] Peter Dimov wrote: From: David B. Held Peter Dimov wrote: My answer is that specifying the precise semantics of what() for every documented exception type is a necessary prerequisite. (Implies that the standard needs to be fixed, too.)

RE: [boost] Re: Formal Review Request: class optional

2002-11-22 Thread Rozental, Gennadiy
We already talked about this: pointer will add extra memory access, optional should not (in fact it should be inlined and won't be different from by value parameter) You are mis-remembering our previous talk. No. I do remembr that we agreed that pointer semantics is better. I

Re: [boost] Serialization XML (was Serialization Library

2002-11-22 Thread Dave Harris
In-Reply-To: [EMAIL PROTECTED] On Fri, 22 Nov 2002 15:33:47 +0100 Wesley W. Terpstra ([EMAIL PROTECTED]) wrote: You will not need any hooks; to fully bracket the data, you can use a type-conversion trick made concrete below. It's a neat trick, but I'd rather not rely on tricks. I might want:

RE: [boost] Re:Serlialization Library

2002-11-22 Thread Dave Harris
In-Reply-To: [EMAIL PROTECTED] On Tue, 19 Nov 2002 21:38:09 -0800 Robert Ramey ([EMAIL PROTECTED]) wrote: How do we intialize the const member? MyClass::MyClass( basic_iarchive ar ) : i(loadint(ar)) { } What about version 2 MyClass::MyClass( basic_iarchive ar ) : i(

Re: [boost] RE: Serialization Library Review

2002-11-22 Thread Dave Harris
In-Reply-To: [EMAIL PROTECTED] On Tue, 19 Nov 2002 08:09:13 +0100 Matthias Troyer ([EMAIL PROTECTED]) wrote: The only solution which comes to my mind is additional virtual functions for writing blocks of primitive types, which default to just calling the operator () n times, but can be

[boost] Re: Re: Do we need a boost_exception class or idiom?

2002-11-22 Thread David B. Held
Peter Dimov [EMAIL PROTECTED] wrote in message 01d801c29268$c6496cb0$1d00a8c0@pdimov2">news:01d801c29268$c6496cb0$1d00a8c0@pdimov2... From: David B. Held [EMAIL PROTECTED] [...] Well, as you were saying, that it return a unique documented value for each exception type. Or did I not

Re: [boost] Re: Re: Do we need a boost_exception class or idiom?

2002-11-22 Thread Peter Dimov
From: David B. Held [EMAIL PROTECTED] Peter Dimov [EMAIL PROTECTED] wrote in message 01d801c29268$c6496cb0$1d00a8c0@pdimov2">news:01d801c29268$c6496cb0$1d00a8c0@pdimov2... From: David B. Held [EMAIL PROTECTED] [...] Well, as you were saying, that it return a unique documented value for

[boost] Re: Re: Formal Review Request: class optional

2002-11-22 Thread Fernando Cacciola
Rozental, Gennadiy [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... We already talked about this: pointer will add extra memory access, optional should not (in fact it should be inlined and won't be different from by value parameter) You are

Re: [boost] Re: sub string and string algo.

2002-11-22 Thread Pavol Droba
On Fri, Nov 22, 2002 at 02:03:49PM -0500, Alexei Novakov wrote: Pavol Droba [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, On Thu, Nov 21, 2002 at 02:48:09PM -0500, Alexei Novakov wrote: [snip] Alexei. Cool, I'd definitely use it

RE: [boost] Re: [MPL Lambda]

2002-11-22 Thread Aleksey Gurtovoy
David B. Held wrote: For your own metafunctions, you have to intrude them a little bit, but otherwise it works as well: template typename T struct f { typedef T type; BOOST_MPL_AUX_LAMBDA_SUPPORT(1,f,(T)) // here }; [...] I assume it's safe to

Re: [boost] Re: Re: Implicit conversions in dynamic_any / extract

2002-11-22 Thread David Abrahams
Remy Blank [EMAIL PROTECTED] writes: On Fri, 22 Nov 2002 11:10:19 -0500, David Abrahams [EMAIL PROTECTED] wrote: Remy Blank [EMAIL PROTECTED] writes: I have looked at Boost.Python, and it is very similar to what I had in mind. Would it be possible to make Boost.Python more general to

[boost] RE: Serialization Library Review

2002-11-22 Thread Augustus Saunders
I have been following the discussion thread for the serialization library review with some interest, as I think the topic is of extreme importance. Right up there with smart pointers and threading, it's something that would be used by many people for many different things. I want to thank

[boost] RE: Serialization Library Review

2002-11-22 Thread Robert Ramey
Date: Fri, 22 Nov 2002 16:34:46 -0800 (PST) From: Augustus Saunders [EMAIL PROTECTED] Persistence: A transformation-less transfer of application native data to an alternate storage medium. Only useful and only intended to be useful to applications that apriori agree on object type and layout,

[boost] FW: Serialisation library review

2002-11-22 Thread Robert Ramey
Note: This was sent directly to me by Pavel Vozenilek. I am posting it to the list. Robert Ramey I recommend to accept serialisation library into Boost. I played with the library for few hours and used Intel C++ 6.0 plugged in Visual C++ 6.0 IDE (and Visual C++ 6.0 STL) to compile examples

[boost] FW: The results of your email commands

2002-11-22 Thread Robert Ramey
From: Alberto Barbati [EMAIL PROTECTED] One note: the library, as it is, *does not* support Unicode output, as stated. [snip] Well I quadriple checked and ran your example and of course you are right. The text archive eliminated the high order byte. I have addressed the