[boost] BOOST_CHECK_EQUAL_COLLECTIONS proposal

2003-04-04 Thread Vladimir Prus
I've just tried to use the above test tool, and see the following: svertka.driver.cpp(127): error in test_svertka: test {result.begin(), result.end()} == {result2, ...} failed [-431600044 != -78651042] I think this message misses one thing: the position where mismatch occured. If

[boost] Re: BOOST_CHECK_EQUAL_COLLECTIONS proposal

2003-04-04 Thread Gennadiy Rozental
svertka.driver.cpp(127): error in test_svertka: test {result.begin(), result.end()} == {result2, ...} failed [-431600044 != -78651042] I think this message misses one thing: the position where mismatch occured. If differing values are printed, it's natural to print position, too.

[boost] Re: Variant Library: visitation algorithm

2003-04-04 Thread Gennadiy Rozental
Eric Friedman [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Gennadiy Rozental wrote: While I do agree O(1) is better than O(N), I would like to point out that it is usable only when the pseudo-variadic template interface is used (i.e., variantT1, T2, ..., TN as opposed to

Re: [boost] Re: BOOST_CHECK_EQUAL_COLLECTIONS proposal

2003-04-04 Thread Vladimir Prus
Gennadiy Rozental wrote: svertka.driver.cpp(127): error in test_svertka: test {result.begin(), result.end()} == {result2, ...} failed [-431600044 != -78651042] I think this message misses one thing: the position where mismatch occured. If differing values are printed, it's

Re: [boost] Re: Variant Library: variant size and strong guaranty

2003-04-04 Thread David Abrahams
Eric Friedman [EMAIL PROTECTED] writes: While this is certainly quite implementable, I feel a bit uneasy about hinging variant's exception-safety guarantees on such a small point as whether 'void' content is allowed. I imagine it would not only make variant more confusing to use but also may

Re: [boost] Re: Re: Boost.Python and BCC

2003-04-04 Thread David Abrahams
Chris Trengove [EMAIL PROTECTED] writes: David Abrahams [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Please see if you can come up with a simpler non-specific approach which might break cwpro7. That's what I'd like to have in the codebase. I think I have come across an

Re: [boost] BOOST_HAS_THREADS in Win32

2003-04-04 Thread William E. Kempf
Jiang Hong said: I'm new to boost. But should '#define BOOST_HAS_THREADS' be added to boost_1_30_0/config/platform/win32.hpp? Or is there a better way? This is defined by the config headers if the compiler you're using has indicated that multi-threading has been requested during

Re: [boost] indentation algorithm for stream objects

2003-04-04 Thread Reece Dunn
Larry Evans wrote: I disagree. The following (almost) line by line translation of your example to marg_ostream: As I said, I don't know the details of the implementation, so that was a speculation based on how I presumed it was implemented. That's why I like your way; however, in the back of my

Re: [boost] Adding a generic list manipulator

2003-04-04 Thread Reece Dunn
Paul A. Bristow wrote: Thanks for repackaging the code inside zip, and for mor examples, and making it work 'strictly' MXVC 7.0 Level 4 NO language extensions No problem. But handling at least 2D and 3D C arrays is still acommon requirement. The problem with 2 or more dimensions is that you

Re: [boost] Re: Using variant library with Boost 1.30.0

2003-04-04 Thread Allen Bierbaum
Eric Friedman wrote: Allen Bierbaum wrote: I have been very impressed with the Variant library and started using it with Boost 1.29. Good to hear. I'd be interested in your experience using the library in a real-world (?) application. I was able to get variant working with 1.30 by pulling

[boost] [lambda]/[spirit-phoenix] Lazy evaluation+expressiontemplates

2003-04-04 Thread Fernando Cacciola
Hi, First question: I see that there is a phoenix subdirectory under both boost/spirit and lib/spirit; does this mean that pheonix is distributed with boost 1.30.0? or only part of it? Second question: I'm trying to do something which I think could be done with some of the functional programming

[boost] Re: Re: Variant Library: top level const types

2003-04-04 Thread Eric Friedman
Gennadiy Rozental wrote: So what I want is typedef boost::variantint const,std::string const GlobalParameter; GlobalParameter input_socket( 12345 ); // localhost::12345 GlobalParameter output_socket( MultiplexorSocket ); [snip] What if variant is the member of the class

[boost] Re: Variant Library: variant size and strong guaranty

2003-04-04 Thread Eric Friedman
Gennadiy Rozental wrote: overview.) This technique is necessary to provide a general guarantee of strong exception-safety, which in turn is necessary to maintain a never empty invariant for variant. What is this invariant? And why is it that important. The invariant is quite

[boost] Re: Variant Library: visitation algorithm

2003-04-04 Thread Eric Friedman
Gennadiy Rozental wrote: Eric Friedman [EMAIL PROTECTED] wrote: [snip] If variant is given types as a MPL-sequence (e.g., variant mpl::listT1, T2, ..., TN instead of variantT1, T2, ..., TN), then technique you propose will not work. Please prove me incorrect, but I don't think you can.

[boost] Re: Re: Using variant library with Boost 1.30.0

2003-04-04 Thread Eric Friedman
Allen Bierbaum wrote: Eric Friedman wrote: Allen Bierbaum wrote: I have been very impressed with the Variant library and started using it with Boost 1.29. Good to hear. I'd be interested in your experience using the library in a real-world (?) application. I was able to get

Re: [boost] [lambda]/[spirit-phoenix] Lazyevaluation+expressiontemplates

2003-04-04 Thread Joel de Guzman
Fernando Cacciola wrote: Hi, First question: I see that there is a phoenix subdirectory under both boost/spirit and lib/spirit; does this mean that pheonix is distributed with boost 1.30.0? or only part of it? There will be an LL/Phx merger. I hope it will be soon. That depends a lot on

[boost] Re: Re: Re: Boost.Python and BCC

2003-04-04 Thread Chris Trengove
David Abrahams [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is this what you meant by not being able to use template syntax with member function pointers? Yes, this is the infamous BCC emoticon bug. The parser accepts a number of characters (in addition to ) as valid in terminating

[boost] Re: Re: Variant Library: top level const types

2003-04-04 Thread Gennadiy Rozental
I argue that top-level const type arguments are meaningless in the context of variant. Given the example you provide: typedef boost::variantint const, std::string const GlobalParameter; GlobalParameter input_socket(12345); input_socket = 54321; // no way to prevent this!! How come!?

[boost] Re: Variant Library: visitation algorithm

2003-04-04 Thread Gennadiy Rozental
case MAX_WITCH: visitor( Typelist[MAX_WITCH](storage) ); break; } } Your pseudo-code is misleading. There is no MAX_WHICH available to the preprocessor when MPL-sequences are given because there is no theoretical upper limit on the size of a

[boost] Re: Variant Library: variant size and strong guaranty

2003-04-04 Thread Gennadiy Rozental
2. Could type that implements swap() method somehow follow the second case road also? For example, could you somehow deduce T* from buffer and swap it with local copy of the argument? Yes, I can look into such optimizations. But as I noted in previous messages, if I can prevent