[boost] 'function' idea

2002-11-09 Thread Aleksey Gurtovoy
A crazy thought - how about enabling something like this: #include boost/function.hpp #include cassert int main() { boost::functionbool () f0 = true; boost::functionint () f1 = -1; boost::functionstd::string () f2= text; assert(f0() == true);

RE: [boost] 'function' idea

2002-11-09 Thread Aleksey Gurtovoy
Douglas Gregor wrote: On Saturday 09 November 2002 07:21 pm, Aleksey Gurtovoy wrote: [snip some code...] template typename T yes_tag is_callable_helper( sink sizeof(T::operator()) * ); [snip more code...] Won't work if there are multiple overloads of operator

RE: [boost] 'function' idea

2002-11-09 Thread Aleksey Gurtovoy
Paul Mensonides wrote: - Original Message - From: Aleksey Gurtovoy [EMAIL PROTECTED] Yes, I also happened to think that would be a preferred way to get equivalent of the hypothetical '__is_well_formed(...)' functionality. However, assuming that we got that one or another way

RE: [boost] MPL fold algorithms

2002-11-15 Thread Aleksey Gurtovoy
Gennadiy Rozental wrote: Would it correct to state that following pseudo-code properly reflect the essence of the appropriate algorithms: iter_fold( sequence s, state st, binary_operator op ) { iterator it = s.begin(); while( it != s.end() ) st = op( st, it ); return

RE: [boost] MPL remarks

2002-11-15 Thread Aleksey Gurtovoy
Gennadiy Rozental wrote: 1. Copy reference page in a semantics section contains strange text. Are you sure it is true? Yes :). Citing the Description section: copy is, in fact, just another name for fold. It was introduced for symmetry with copy_if [1], and because it's a nice name for one of

[boost] MPL's round lambda

2002-11-18 Thread Aleksey Gurtovoy
If you are tired of angle brackets in your templates (no, it's not a TV commercial :), may be you'll like this one: typedef eval count_if( list(int,char,long,int) , lambda(is_same(_,int)) ) ::type res; BOOST_STATIC_ASSERT(res::value

RE: [boost] MPL's round lambda

2002-11-19 Thread Aleksey Gurtovoy
David Abrahams wrote: Interesting. Like Dirk, I too am wondering what the point is, beyond syntactic sugar. What is the point of what exactly? Of yet another lambda notation? Of round brackets? Of my post? :) Anyway, there wasn't much of the point besides demonstrating that something like

RE: [boost] [MPL] Several Questions

2002-11-20 Thread Aleksey Gurtovoy
David A. Greene wrote: I'm starting to explore mpl a bit and I ran into a roadblock. If I have a template that takes an argument that can be a sequence (e.g. mpl::vector) or a regular old type, is there any way, short of specialization, to determine whether the parameter is a sequence?

RE: [boost] [MPL Lambda]

2002-11-21 Thread Aleksey Gurtovoy
David B. Held wrote: Does it work with VC6? For all type traits templates and MPL's own metafunctions/algorithms - yes, without any restrictions; for instance, boost/mpl/test/lambda.cpp compiles on MSVC 6.5 as is. For your own metafunctions, you have to intrude them a little bit, but otherwise

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] How best to use Wiki (was Sockets)

2002-11-23 Thread Aleksey Gurtovoy
David Abrahams wrote: Jeff Garland [EMAIL PROTECTED] writes: 4) The MPL team used another Wiki to develop documentation. Not sure how that worked. Aleksey care to comment? I can tell you that it ended up being pretty one-sided. It was great for Aleksey - he had the whole Wiki on his

RE: [boost] [MPL] Several Questions

2002-11-24 Thread Aleksey Gurtovoy
David A. Greene wrote: is_sequenceT::value, please expect it to appear in the CVS in a day or two :). Oh, fabulous! Just what I ws looking for. It's there! Doesn't work with Borland and GCC 2.95 (3.2 is OK), though, currently, as it relies on 'has_begin' and 'has_tag' traits, and there

RE: [boost] [MPL] Several Questions

2002-11-26 Thread Aleksey Gurtovoy
David A. Greene wrote: I do need to be able to start at various points within the sequence. Your second solution fleshes out the design I had in mind, but I was out of town over the weekend so you beat me to the punch. :) Actually, I wrote too much code in that solution ;). Just this would be

RE: [boost] mpl transform

2002-11-26 Thread Aleksey Gurtovoy
David Abrahams wrote: Well I hope that was all instructive, but it was probably way more complicated than neccessary. I think it would actually be far superior to build a solution around an mpl iterator adaptor like this one: template class IteratorSeq struct zip_iterator {

RE: [boost] Re: Re: [MPL + MSVC]

2002-11-30 Thread Aleksey Gurtovoy
David B. Held wrote: template class Policy struct get_category : mpl::if_ mpl::is_placeholderPolicy , mpl::identityPolicy , get_category_implPolicy ::type {

RE: [boost] [MPL] vector of vectors

2002-12-01 Thread Aleksey Gurtovoy
David A. Greene wrote: Is it possible to have an MPL vector of MPL vectors? Sure. MPL sequences are polymorphic regarding their elements; everything that is a type can be put into a sequence, and everything in MPL is a type :). When I try this, the compiler (g++ 3.2) complains about an

RE: [boost] [Config] Testing instructions for compiler vendors

2002-12-05 Thread Aleksey Gurtovoy
David Abrahams wrote: I'm trying to come up with instructions for compiler vendors who want to use Boost to test their compilers. What preprocessor symbols do they need to define? So far, it looks like: - BOOST_NO_COMPILER_CONFIG - BOOST_NO_STDLIB_CONFIG - if they want to check

RE: [boost] [MPL] Making Generators

2002-12-06 Thread Aleksey Gurtovoy
David A. Greene wrote: [Posted to boost because MPL is not yet released. At what point should these questions go to boost-users?] It's mainly the content of the message that determines whether it should be posted here or to the Boost Users list; the status of the library - is it in

RE: [boost] Re: [MPL] Making Generators

2002-12-06 Thread Aleksey Gurtovoy
David B. Held wrote: In C++ Templates: The Complete Guide (Recommended), they give this example on pages 106-107: typedef char RT1; typedef struct {char a[2];} RT2; templatetypename T RT1 test(typename T::X const*); templatetypename T RT2 test(...); #define

RE: [boost] Re: [MPL] Making Generators

2002-12-07 Thread Aleksey Gurtovoy
David Abrahams wrote: MPL's implementation (boost/mpl/aux_/has_xxx.hpp) is known to work on Comeau, Intel (all versions), MSVC (all versions), Metroweks 8.3/8.2 and GCC 3.2. There is no known way to make it work on Borland. You can test it against any other compiler by trying out

RE: [boost] Regression test woes

2002-12-09 Thread Aleksey Gurtovoy
David Abrahams wrote: Second, with VC++ large numbers of warnings are now appearing for many type traits headers. Which version? I can't reproduce these problems with 6, 7, or 7.1. I can't either, but I fixed it anyway :). Aleksey ___

RE: [boost] mpl - fsm generator - compile failure

2002-12-10 Thread Aleksey Gurtovoy
Virgilio, Vincent wrote: Has anybody successfully compiled Aleksey Gurtovoy's state machine generator with gcc 3.2 over Boost 1.29 (which includes the mpl)? The version in the CVS (libs/mpl/example/fsm) compiles succesfully on Intel C++ 6.0/7.0, GCC 3.2/2.95.3, and VC 7.1. [from a follow-up]

RE: [boost] RE: mpl - fsm generator - compile failure

2002-12-10 Thread Aleksey Gurtovoy
Virgilio, Vincent wrote: I apologize for the incompleteness of my last message: In addition to a successful compile of the fsm generator, the 'player' example works as well. Thank you for such high quality software, My pleasure, and thanks! Aleksey

RE: [boost] mpl::copy_backward conflicts

2002-12-10 Thread Aleksey Gurtovoy
Peter Dimov wrote: From: vladimir josef sykora [EMAIL PROTECTED] template class Sequence struct foo { }; // usage example : typedef boost::mpl::vector... types; typedef footypes foo_types; std::vectorfoo_types

RE: [boost] [Config] Testing instructions for compiler vendors

2002-12-10 Thread Aleksey Gurtovoy
David Abrahams wrote: I agree completely, and I'll even promise not to change my mind for at least a week :-) Good! You, Aleksey and I all agree. So shall we go with this definition of BOOST_WORKAROUND from Gennaro Prota? #define BOOST_WORKAROUND(symbol, test) ((symbol != 0)

RE: [boost] Re: re: Borland regression test failures

2002-12-13 Thread Aleksey Gurtovoy
Hugo Duncan wrote: On Fri, 13 Dec 2002 20:16:18 GMT, Hugo Duncan [EMAIL PROTECTED] wrote: This gets rid of most of the failures oops, cut and paste error. try this RCS file: /cvsroot/boost/boost/boost/mpl/bool_c.hpp,v retrieving revision 1.3 diff -r1.3 bool_c.hpp 38c38 using

RE: [boost] Re: [MPL] Making Tuples

2002-12-17 Thread Aleksey Gurtovoy
David A. Greene wrote: Well, that's not creating a boost::tuple. :) I could certainly use mpl::fold or some similar algorithm to create boost::tupleint, boost::tuple...but I'm not sure that really a boost::tuple either. consint, cons...might be closer. Yep, the later will give you

RE: [boost] [MPL] Making Generators

2002-12-17 Thread Aleksey Gurtovoy
Aleksey Gurtovoy wrote: David A. Greene wrote: Thanks for considering this. I think it will be quite useful. I look forward to seeing what you come up with! Well, it turned out to be a little bit more complicated than I had foreseen, so it's not there yet. Please stay tuned! Okay

RE: [boost] Re: [MPL] Making Tuples

2002-12-17 Thread Aleksey Gurtovoy
David Abrahams wrote: Aleksey Gurtovoy [EMAIL PROTECTED] writes: Yep, the later will give you all the functionality of 'boost::tupleint,...' except the constructors and assignment from 'std::pair'. A generator for it is as simple as this: template typename Types struct tuple_gen

RE: [boost] The Wonder of Tuples

2002-12-17 Thread Aleksey Gurtovoy
David A. Greene wrote: The fundamental problem is that it's inconvenient to iterate through a tuple. 'tuple_ext' (tuple extensions) make it easier - http://groups.yahoo.com/group/Boost-Users/message/704. Aleksey ___ Unsubscribe other changes:

RE: [boost] Reflection Framework [was Serialization and Reflection]

2002-12-17 Thread Aleksey Gurtovoy
[EMAIL PROTECTED] wrote: Finally, is there anyone interested in working on a reflection framework? I've been recently drafting some interfaces for purely compile-time reflection framework. It will clearly need a compiler support to implement; the current plan is to prototype it in GCC. It's an

RE: [boost] Reflection Framework [was Serialization and Reflectio n]

2002-12-19 Thread Aleksey Gurtovoy
[EMAIL PROTECTED] wrote: On Tue, 17 Dec 2002, Aleksey Gurtovoy wrote: I've been recently drafting some interfaces for purely compile-time reflection framework. It will clearly need a compiler support to implement; the current plan is to prototype it in GCC. It's an on-and-off project

RE: [boost] mpl and codewarrior 8.3 (patch)

2002-12-22 Thread Aleksey Gurtovoy
David Abrahams wrote: Hum, hum. I *am* seeing one error from the MPL regressions with cwpro8.3: [snip as_sequence.cpp test errors] However, it doesn't look like it's preprocessor-related. Yep, it's not. It's a known failure, which I didn't have time to track down yet... hmm, apparently,

RE: [boost] mpl and codewarrior 8.3 (patch)

2002-12-26 Thread Aleksey Gurtovoy
Russell Yanofsky wrote: It would be helpful if you had this information in the documentation at http://www.mywikinet.com/mpl/ http://www.boost.org/libs/mpl/doc/ since both of those pages say the latest sources are on the v2 branch. Done. Aleksey

RE: [boost] Using MPL on MSVC7

2002-12-30 Thread Aleksey Gurtovoy
Jaap Suter wrote: what's the current status on using MPL on different compilers? I have looked at http://www.mywikinet.com/mpl/log.html but it seems not all meta-functions are listed there. I would say that currently the tests cover about 80% of library functionality, so the aforementioned

RE: [boost] Re: Using MPL on MSVC7

2002-12-31 Thread Aleksey Gurtovoy
Jaap Suter wrote: parameters. I did this in a few places for operators that MPL doesn't implement (left shift, bitwise or, etc.). Now I'm putting them in a seperate static constant first, and then using that constant as a template parameter. That really solves a _lot_ of my MSVC problems.

RE: [boost] Re: Re: Using MPL on MSVC7

2002-12-31 Thread Aleksey Gurtovoy
David Abrahams wrote: Lastly, I know that Aleksey will argue with me about this, Yep, I will :). but I have a strong preference for class rather than typename in template parameter lists. Aside from the fact that it's longer, typename is visually confusable because it can mean other

[boost] BOOST_PP_RANGE?

2003-01-01 Thread Aleksey Gurtovoy
I am going to use our wonderful Preprocessor library to generate a metafunction that basically looks like this: template int C0, int C1, ..., int Cn struct max_arity { static int const value = Cn 0 ? Cn : ( Cn-1 0 ? Cn-1 : ... ( C1 0 ? C1 : (

RE: [boost] BOOST_PP_RANGE?

2003-01-01 Thread Aleksey Gurtovoy
Paul Mensonides wrote: #include boost/preprocessor/seq/fold_left.hpp #include boost/preprocessor/seq/subseq.hpp #define NUMBERS \ (0)(1)(2)(3)(4)(5)(6)(7)(8)(9) \ (10)(11)(12)(13)(14)(15)(16)(17)(18)(19) \ /* ... */ #define RANGE(first, length) \ BOOST_PP_SEQ_SUBSEQ(

RE: [boost] BOOST_PP_RANGE?

2003-01-01 Thread Aleksey Gurtovoy
Paul Mensonides wrote: - Original Message - From: Aleksey Gurtovoy [EMAIL PROTECTED] #define NUMBERS \ (0)(1)(2)(3)(4)(5)(6)(7)(8)(9) \ (10)(11)(12)(13)(14)(15)(16)(17)(18)(19) \ /* ... */ #define RANGE(first, length) \ BOOST_PP_SEQ_SUBSEQ( NUMBERS

RE: [boost] New MPL meta-functions, and a question

2003-01-02 Thread Aleksey Gurtovoy
Jaap Suter wrote: Hi, Hi Jaap, I've written some MPL meta-functions that might be useful. But first a question though... Is it possible that (under certain conditions) the following line: mpl::int_c mpl::minus mpl::int_c 0 , mpl::int_c

RE: [boost] boost regression testing of MPL on HPUX

2003-01-02 Thread Aleksey Gurtovoy
Toon Knapen wrote: Finally I found out that aCC has a problem with the typename mixed with the template spec. So if I write the construct like this it works. Could you apply this patch ? Sure, done. Aleksey ___ Unsubscribe other changes:

RE: [boost] New MPL meta-functions, and a question

2003-01-02 Thread Aleksey Gurtovoy
David A. Greene wrote: Aleksey Gurtovoy wrote: Figuring out a reasonable way to specify the promotion rules is probably the hardest part there... I actually did some work on this in the past but it's been sitting on the shelf for a while and probably needs a bit of pounding into shape

RE: [boost] Re: Re: Using MPL on MSVC7

2003-01-04 Thread Aleksey Gurtovoy
Jaap Suter wrote: Nifty! You're using one of my favorite metaprogramming tricks, the default template parameter which allows you to avoid creating a separate implementation template. I almost forgot about that one, it's been so long since I've been able to use it. Funny you mention

RE: [boost] New MPL meta-functions, and a question

2003-01-04 Thread Aleksey Gurtovoy
David A. Greene wrote: Does this sound at all interesting? Very! The implementation is complex (didn't have MPL at the time) but can probably be cleaned up some. It may be too flexible for your needs. Even if so, it would give us some interesting prior art to start with

[boost] [MPL] naming question

2003-01-04 Thread Aleksey Gurtovoy
Hi all, How would you call an 'apply' counterpart that takes a metafunction class and a _sequence_ of arguments, i.e.: typedef list_cint,5,0 args; typedef apply_tuple plus, args ::type sum; // this one BOOST_STATIC_ASSERT(sum::value == 5); ? If it was run-time C++, I would be happy

RE: [boost] [MPL] naming question

2003-01-04 Thread Aleksey Gurtovoy
Terje Slettebø wrote: I guess this is another good argument for class template overloading. Does anyone know if this has been formally proposed for C0x? AFAIK, no. A quick search at Google Groups turned up nothing. With it, you might have used: template struct plusdefault_type,

RE: [boost] [MPL] naming question

2003-01-06 Thread Aleksey Gurtovoy
Greg Colvin wrote: If this construct applies a metafuntion to a sequence It does and it doesn't :). Sorry if I wasn't clear about the semantics; it does not apply a metafunction to every element of a sequence; That would be for_each ? Almost - 'for_each' only makes sense if a

RE: [boost] MPL Lambda on MSVC 7

2003-01-11 Thread Aleksey Gurtovoy
Jaap Suter wrote: Hi, Hi Jaap, I need some help with providing lambda support for my own meta functions. I think this has to do with the following thread: http://aspn.activestate.com/ASPN/Mail/Message/1387917 but I can't really figure out what to do. Have you seen this one -

RE: [boost] Re: New MPL meta-functions, and a question

2003-01-12 Thread Aleksey Gurtovoy
Jaap Suter wrote: Actually, I was planning on bringing the content of arithmetic, logic and comparison directories to boost/mpl root (still preserving the corresponding composite headers). In that light, I would suggest putting the new headers directly into the root directory as well.

RE: [boost] Re: MPL Lambda on MSVC 7

2003-01-12 Thread Aleksey Gurtovoy
Jaap Suter wrote: So I tried to come up with the actual smallest example that doesn't compile, even with the LAMBDA_SUPPORT macro. It looks as follows: template class T struct meta_fun_1 { typedef mpl::integral_c typename T::value_type, 0 type; BOOST_MPL_AUX_LAMBDA_SUPPORT( 1,

RE: [boost] mpl::find_if problem on vc7 (once more)

2003-01-14 Thread Aleksey Gurtovoy
Pavol Droba wrote: Hi, Hi Pavol, I have sent a problem report on the list, recently, regarding mpl::find_if algorithm on vc7 platform. I'm using 1.29 release not current cvs snapshot. I assume, that description was not good enough so I haven't got any response. Sorry, I think I just

RE: [boost] type traits question

2003-01-18 Thread Aleksey Gurtovoy
Ronald Garcia wrote: Here's the version blurb: Edison Design Group C/C++ Front End, version 2.43.1 (Jan 16 2001 11:20:19) Copyright 1988-1999 Edison Design Group, Inc. KAI C++ 4.0d (KCC) -- Jan 16 2001 -- (C) Copyright 1994-2000 Kuck Associates, Inc. Thanks! AFAIK It supports

RE: [boost] type traits question

2003-01-18 Thread Aleksey Gurtovoy
Ronald Garcia wrote: The code you posted compiles under KCC both with and without the --strict command-line parameter. Good, check out the latest CVS sources, then - the issue should be fixed now. Hope this helps, and thank you. You are welcome! Aleksey

RE: [boost] Re: MPL usage for code generation

2003-01-23 Thread Aleksey Gurtovoy
David Abrahams wrote: Terje Slettebø [EMAIL PROTECTED] writes: Perhaps it might be possible to do some compile-time/run-time lambda (similar to Boost.Lambda for runtime, and MPL's lambda), so you could do something like: mpl::for_eachmy_list(my_function_(s)); It would then

RE: [boost] Re: MPL usage for code generation

2003-01-24 Thread Aleksey Gurtovoy
Hugo Duncan wrote: Including for_each.hpp on bcc561 gives Error E2230 c:\usr\boost\boost/mpl/aux_/preprocessed/bcc/template_arity.hp p 20: In-line data member initialization requires an integral constant expression Any chance of finding a fix for this? I am having problems working

RE: [boost] MPL::void_t

2003-01-24 Thread Aleksey Gurtovoy
Joel de Guzman wrote: Hi, Hi Joel, Question why is mpl::void_t an incomplete type? I suppose we are talking about 'mpl::void_'. Since we have a use case for it now, just go ahead and make it complete! (A short comment would be nice, too :). Aleksey

RE: [boost] Re: MPL usage for code generation

2003-01-24 Thread Aleksey Gurtovoy
Joel de Guzman wrote: Here's the Phoenix version: struct my_function_ { template typename Arg1T, typename Arg2T struct result { typedef void type; }; template typename U void operator()(std::string const text, U) { // ...

[boost] BOOST_WORKAROUND question

2003-01-24 Thread Aleksey Gurtovoy
What would be an equivalent of the following #fief, if I want to re-writte it using our new BOOST_WORKAROUND macro? // last checked with 0x561 #if defined(__BORLANDC__) __BORLANDC__ = 0x561 !defined(BOOST_STRICT_CONFIG) Here, 0x561 is the first version requiring the workaround and at the same

RE: [boost] RE: Re: MPL usage for code generation

2003-01-24 Thread Aleksey Gurtovoy
Hugo Duncan wrote: On Fri, 24 Jan 2003 09:17:00 -0600, Aleksey Gurtovoy [EMAIL PROTECTED] wrote: I don't have access to 5.6.1, so I would need some cooperation to fix it. 5.6.1 is 5.6 with patch 2 applied. Yeah, only the patch cannot be applied to an evaluation version

RE: [boost] MPL include problem with BOOST_PP_ITERATE

2003-01-24 Thread Aleksey Gurtovoy
Hugo Duncan wrote: I think I have found a problem with boost/mpl/list.hpp I am including files using BOOST_PP_ITERATE. One of the files that I include happens itself to include boost/mpl/list.hpp. boost/mpl/list.hpp begins #if !defined(BOOST_PP_IS_ITERATING) / header body

RE: [boost] Re: MPL include problem with BOOST_PP_ITERATE

2003-01-24 Thread Aleksey Gurtovoy
Hugo Duncan wrote: Maybe my use of ITERATE is slightly different, in that I am using it to include a LIST of files. The LIST provides a single integration point. Hoisting all the includes reduces the utility of using ITERATE. OK, I see the problem now. I can hoist the include of

RE: [boost] Re: MPL include problem with BOOST_PP_ITERATE

2003-01-25 Thread Aleksey Gurtovoy
Paul Mensonides wrote: - Original Message - From: Aleksey Gurtovoy [EMAIL PROTECTED] You have a point, here. I'll look into the issue tonight. Don't bother. What Hugo is doing is a sketchy use of the mechanism precisely because of this type of problem. Even if you efine

RE: [boost] mpl::is_sequence incomplete_type ?

2003-02-05 Thread Aleksey Gurtovoy
Andreas Huber wrote: Hi there Hi Andreas, I tried to use mpl::is_sequence on an incomplete type and ran into errors suggesting that the argument must not be incomplete (I'm using MSVC 7.0). I assume this cannot be fixed, right? It might be possible to fix it, but it will require some

RE: [boost] Re: some more questions on MPL and Borland

2003-02-05 Thread Aleksey Gurtovoy
Joel de Guzman wrote: Yaiks! I hope it gets fixed soon. Spirit has been committed to the boost CVS now and I just switched to MPL so Spirit relies on MPL now. If you look at the errors more closely, you'll see that it's not MPL, but 'is_convertible' that is broken, for Borland 5.5.1; yes,

RE: [boost] Re: mpl::is_sequence incomplete_type ?

2003-02-06 Thread Aleksey Gurtovoy
Andreas Huber wrote: It might be possible to fix it, but it will require some work. Let me know if it's important for you, and I'll move it up in my TODO list. Well, it is not that important since mpl::is_sequence is only used to provide some syntactic sugar. Yep, I understand that;

RE: [boost] Re: integral_c on g++2.95.3

2003-02-06 Thread Aleksey Gurtovoy
Fernando Cacciola wrote: I was suspicious of next/prior in integral_c from the beggining... That's why I asked what was the intended role of integral_c, and why does it feature next/prior. It has 'next'/'prior' members because it's the easiest/most efficient way to implement 'next/prior

RE: [boost] [mpl] More problems with MSVC 7.0, 8-/

2003-02-07 Thread Aleksey Gurtovoy
Andreas Huber wrote: The attached code works like a dream on MSVC 7.1, but MSVC 7.0 again has its problems: Problem No. 1: Expression 1 does not seem to work, because Derived is an incomplete type: To reproduce, you might want to comment-out expression 3 and uncomment expression 4.

RE: [boost] Re: Re: mpl::is_sequence incomplete_type ?

2003-02-07 Thread Aleksey Gurtovoy
Andreas Huber wrote: In my application the argument passed to is_sequence is _never_ a complete type. See below for reasons. OK, understood. The issue is fixed in the CVS. Aleksey ___ Unsubscribe other changes:

RE: [boost] Re: integral_c on g++2.95.3

2003-02-08 Thread Aleksey Gurtovoy
Gennaro Prota wrote: On Thu, 6 Feb 2003 06:05:23 -0600, Aleksey Gurtovoy [EMAIL PROTECTED] wrote: It has 'next'/'prior' members because it's the easiest/most efficient way to implement 'next/prior integral_cT,n ::type' functionality on compilers that don't support partial template

RE: [boost] Request for non_copyable.hpp

2003-02-10 Thread Aleksey Gurtovoy
Gustavo Guerra wrote: On the same spirit, I would like to request that boost::non_copyable be also moved to a separate header boost/non_copyable.hpp or boost/utility/non_copyable, so we don't have to include the whole boost/utility.hpp Uhmm, that's actually my fault. I proposed to split

RE: [boost] MPL's gcc ADL fixes

2003-02-11 Thread Aleksey Gurtovoy
vladimir josef sykora wrote: Hello Aleksey, Hi Vladimir, Encapsulating algorithms with a _new_ namespace, and later injecting it into the ::mpl via 'using', solves fine gcc's ADL conflicts. Could you apply BOOST_MPL_AUX_AGLORITHM_NAMESPACE patch to other algorithms? Sure, will do for the

[boost] 'optional' - request for extension

2003-02-13 Thread Aleksey Gurtovoy
The following is a sketch of a potential use case for the newly-accepted and already very useful 'optional' class. Suppose you have a pure RAII guard/locker which unconditionally does its job: struct RAII_lock : boost::noncopyable { RAII_lock(entity e);

RE: [boost] 'optional' - request for extension

2003-02-13 Thread Aleksey Gurtovoy
Anthony Williams wrote: Aleksey Gurtovoy writes: The following is a sketch of a potential use case for the newly-accepted and already very useful 'optional' class. Suppose you have a pure RAII guard/locker which unconditionally does its job: struct RAII_lock

RE: [boost] 'optional' - request for extension

2003-02-14 Thread Aleksey Gurtovoy
Fernando Cacciola wrote: OK, I can see the motivation: We can have a noncopyable class and need an optional object of it. Following optional semantics, it would be spelled: boost::optionalRAII_lock lock; if ( cond ) lock.reset( RAII_lock(entity) ) ; But there is a probem: as William

RE: [boost] suggest a select in mpl

2003-02-14 Thread Aleksey Gurtovoy
Jonathan Wang wrote: Hi, Hi Jonathan, The for-each in mpl is used to generate codes, which apply some function to each element in a sequence. Well, I wonder if there could be more generators, select(a better name?) for example. Easily, 'for_each' is just the one that happened to cover

[boost] tuples::apply

2003-02-15 Thread Aleksey Gurtovoy
Attached is an implementation of 'boost::tuples::apply' function template, providing one with a possibility of function application on a tuple of arguments: #include boost/tuple/tuple.hpp #include boost/tuple/apply.hpp using namespace boost; void f(int, char const*); int

RE: [boost] Re: Re: Re: is_class

2003-02-15 Thread Aleksey Gurtovoy
Daniel Frey wrote: I won't try to fix any of these anymore. I neither understand the documentation nor the implementation of boost's type-traits. I tried to make the code better but AFAICS there is no interest in improvment. Does anyone understand what improvement you're trying to

RE: [boost] boost::bind question

2003-02-20 Thread Aleksey Gurtovoy
Trey Jackson wrote: Just started using boost::bind, like it a lot. I'm playing around with a little work crew, which just queues up data, then calls the function on them later. [...] I'd like to be able to do something like: , | work_crew??? mycrew(bind(X::f, x, _1, _2));

RE: [boost] boost::bind question

2003-02-20 Thread Aleksey Gurtovoy
Trey Jackson wrote: template class DataType, class FunctionType = boost::function1void, DataType class work_crew { std::listDataType queue_; FunctionType engine_; public: work_crew(FunctionType const tocall); void add(DataType d) { queue_.push_front(d); };

Re: [boost] Re: More metaprogramming problems with MSVC7.0

2003-02-23 Thread Aleksey Gurtovoy
Andreas Huber wrote: Hi Aleksey all other metaprogramming gurus Hi Andreas, The attached code compiles just fine with MSVC7.1 but MSVC7.0 once more has its problems. This time I'm quite sure it has nothing to do with MPL, instead VC7.0 seems to get confused and reports the following:

Re: [boost] Re: Re: More metaprogramming problems with MSVC7.0

2003-02-25 Thread Aleksey Gurtovoy
Andreas Huber wrote: P.S. Is it a good idea to use mpl::aux::msvc_eti_base on all platforms (on conforming compilers I'd expect it to call mpl::identity) or should I #ifdef my way around it? Yep, it's intentionally written in the way so that you don't have to #ifdef in your code. Aleksey

Re: [boost] Re: Re: Re: partial proposal

2003-02-25 Thread Aleksey Gurtovoy
Sorry for confusion, the reply below obviously belongs to a different thread. Aleksey Gurtovoy wrote: Andreas Huber wrote: P.S. Is it a good idea to use mpl::aux::msvc_eti_base on all platforms (on conforming compilers I'd expect it to call mpl::identity) or should I #ifdef my way around

Re: [boost] Glitch with mpl::placeholder(s)?

2003-02-28 Thread Aleksey Gurtovoy
Andreas Huber wrote: Aleksey just did a big round of renaming before the first official release of MPL (including changes like int_c - int_, and placeholder - placeholders); I believe that placeholder.hpp is obsolete and should have been removed from CVS. In this case we could keep it for

Re: [boost] [config] BOOST_DEDUCED_TYPENAME

2003-03-05 Thread Aleksey Gurtovoy
David Abrahams wrote: I was just getting ready to propose a new config macro called BOOST_ARG_DEPENDENT_TYPENAME based on this test: struct id { typedef int type; }; template class T struct foo; template class T void f(T) { typedef footypename T::type y;

RE: [boost] RC_1_30_0 compile error with SGI MIPSpro Compilers

2003-03-06 Thread Aleksey Gurtovoy
Ralf W. Grosse-Kunstleve wrote: This requires active participation by the developers. We've spent a lot of time setting up the auto-builds to enable developers to see immediately when their changes break portability. We've also made a major effort cleaning up 1.29.0. That seemed like a good

Re: [boost] RC_1_30_0 compile error with SGI MIPSpro Compilers

2003-03-07 Thread Aleksey Gurtovoy
Aleksey Gurtovoy wrote: If one of the developers could at least comment on this I might give it another try. Otherwise I estimate it would take me weeks to reverse-engineer what is happening here. Ralf, I will definitely look into it tonight and get back to you. OK, I've checked in a fix

RE: [boost] RC_1_30_0 compile error with SGI MIPSpro Compilers

2003-03-07 Thread Aleksey Gurtovoy
Ralf W. Grosse-Kunstleve wrote: OK, I'll wait for a word from Aleksey. If he is happy I'll heck in the eight patches, both into the trunk and the RC_1_30_0 branch. Yep, they all look good to me. Aleksey ___ Unsubscribe other changes:

RE: [boost] 1.30.0 Schedule [was: RC_1_30_0 compile error with SGI MIPSpro Compilers]

2003-03-07 Thread Aleksey Gurtovoy
Ralf W. Grosse-Kunstleve wrote: I've checked in all my patches. I couldn't fully test the C_1_30_0 branch because Aleksey's recent fixes are not there yet. Aleksey, please let me know when the fixes are available on the branch. They there now. Aleksey

Re: [boost] [mpl] Patch for mpl::aux::msvc_eti_base for MSVC7.0

2003-03-09 Thread Aleksey Gurtovoy
Andreas Huber wrote: Hi Aleksey Hi Andreas, Sometimes I have to pass an abstract class to mpl::aux::msvc_eti_base. On MSVC7.0 the compiler complains with the following error: d:\Data\boostCvsRoot\boost\boost\mpl\aux_\is_msvc_eti_arg.hpp(48) : error C2259: 'boost::mpl::inherit2T1,T2' :

Re: [boost] Re: PRB with type_traits::is_member_function_pointer

2003-03-12 Thread Aleksey Gurtovoy
Markus Schöpflin wrote: currently, the is_member_func_test fails for VACPP6 with the following error messages: snip When looking at is_mem_fun_pointer_impl.hpp it looks like the Metrowerks compiler has the same problem. Could anyone please add a check for __IBMCPP__ =600 at line 345

Re: [boost] Re: PRB with type_traits::is_member_function_pointer

2003-03-12 Thread Aleksey Gurtovoy
Markus Schöpflin wrote: Aleksey, thanks for the instructions. Could you tell me which PP you used to generate the file before? I would like to minimize the diff as much as possible? VC 7.1, IIRC, but it shouldn't matter much because the header uses file iteration PP technique, and for most

Re: [boost] Outstanding patches and fixes

2003-03-13 Thread Aleksey Gurtovoy
Beman Dawes wrote: * [config] BOOST_DEDUCED_TYPENAME Status currently unknown. John? Aleksey? Dave will take care of it after the release. It's not urgent in any way. Aleksey ___ Unsubscribe other changes:

RE: [boost] RC_1_30_0 still broken (apologies and help!)

2003-03-16 Thread Aleksey Gurtovoy
Beman Dawes wrote: Both the main trunk and RC_1_30_0 are working fine for me as of Sunday 6PM US Eastern time. If you look into error messages for 'is_class_test.cpp' on MSVC 6.5/7.0, you'll see that they are not; the new failures are getting masked by the fact that earlier the test failed at

RE: [boost] 1.30.0 Outstanding patches and fixes - Sunday night update

2003-03-16 Thread Aleksey Gurtovoy
Beman Dawes wrote: Here is the current list. The second and third items look to me like showstoppers. They are. Aleksey * [Boost.Regex] [PATCH] Fix GCC 3.3 warnings from Lars Gullik Bjønnes. Awaiting response from John Maddock. (Since this one just eliminates warnings, the release

RE: [boost] RC_1_30_0 still broken (apologies and help!)

2003-03-16 Thread Aleksey Gurtovoy
Aleksey Gurtovoy wrote: Oh, I see. But wait, it seems that it's still there - I can update from the CVS, but I cannot check in the fix: cvs server: [18:53:47] waiting for johnmaddock's lock in /cvsroot/boost/boost/boost/type_traits FYI, I submitted a SourceForge support request

RE: [boost] Re: RC_1_30_0 still broken (apologies and help!)

2003-03-17 Thread Aleksey Gurtovoy
Daniel Frey wrote: Still looks broken over here: http://cci.lbl.gov/boost/results/1047901021/dailylog_win32_vc60 I think it's OK to revert the patch to get 1.30.0 out, Which patch? John said the changes that caused the disturbance were never intended to be checked in. but for the

[boost] Re: Doing sets with the MPL

2003-03-18 Thread Aleksey Gurtovoy
Jaap Suter wrote: Hi, Hi Jaap, In some of my MPL-using code I needed set-based functionality. So I wrote a function that does an insertion into an ordered list of constants. However, it seems that if I compare a list created from a bunch of constants to an explicit list, they don't end up

RE: [boost] MPL::lambda on MSVC

2003-03-30 Thread Aleksey Gurtovoy
Jaap Suter wrote: Hi, Hi Jaap, I apologize, but once again I'm unable to get a lambda expression working with the MPL. The code works fine with the Intel and GCC compiler. On MSVC I get the following error: error C2039: 'lhs_index' : is not a member of 'boost::mpl::argN' It's

RE: [boost] When to use which ETI workaround?

2003-03-30 Thread Aleksey Gurtovoy
Andreas Huber wrote: Hi Aleksey, Hi Andreas, Sorry for the late reply, got too many things on my plate. I've stumbled over ETI again. Browsing through MPL I have found different ways to circumvent it. In my case the following workaround seems to be sufficient: template class State

  1   2   >