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

2003-01-04 Thread David Abrahams
Terje Slettebø <[EMAIL PROTECTED]> writes: >>From: "David Abrahams" <[EMAIL PROTECTED]> > >> "Jaap Suter" <[EMAIL PROTECTED]> writes: >> >> > Mm, I still don't quite understand. Consider the following function: >> > >> > void foo( int_c< 0 > ); >> > >> > Shouldn't the following code: >> > >> >

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

2003-01-04 Thread Terje Slettebø
>From: "David Abrahams" <[EMAIL PROTECTED]> > "Jaap Suter" <[EMAIL PROTECTED]> writes: > > > Mm, I still don't quite understand. Consider the following function: > > > > void foo( int_c< 0 > ); > > > > Shouldn't the following code: > > > > foo( int_c< minus< int_c< 4 >, int_c< 4 > >::type

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

2003-01-04 Thread Jaap Suter
> We'd like it to. However, as Aleksey said, until we get typedef > templates, there's no way to make int_c<0> into the same type as > integral_c. The result of > > minus< int_c< 4 >, int_c< 4 > >::type > is > integral_c > > Aleksey will have to tell you why. Given the problems

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

2003-01-04 Thread David Abrahams
"Jaap Suter" <[EMAIL PROTECTED]> writes: >> > Is it possible that (under certain conditions) the following line: >> > >> > SNIP >> > >> > has a different type than this one: >> > >> > SNIP >> >> Uhm, in fact, these are always different: > > Mm, I still don't quite understand. Consider the followin

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

2003-01-04 Thread Jaap Suter
> > Is it possible that (under certain conditions) the following line: > > > > SNIP > > > > has a different type than this one: > > > > SNIP > > Uhm, in fact, these are always different: Mm, I still don't quite understand. Consider the following function: void foo( int_c< 0 > ); Shouldn't th

Re: [boost] BGL: random_access_iterator_property_map missing?

2003-01-04 Thread Douglas Gregor
On Saturday 04 January 2003 11:53 am, Vladimir Prus wrote: > I was just going to use the class named in the subject. Unfortunately, > it can't be found anywhere. Here what grep on an up-to-date CVS tree gives: You probably want "iterator_property_map", which takes a RandomAccessIterator and is us

Re: [boost] [MPL] naming question

2003-01-04 Thread Terje Slettebø
>From: "Aleksey Gurtovoy" <[EMAIL PROTECTED]> > > With it, you might have used: > > > > template<> > > struct plus > > { > > template > > struct apply { ... } > > > > template > > struct apply { ... } > > }; > > > > Yes, except that I don't want to place a burden of supporting both forms o

RE: [boost] [MPL] naming question

2003-01-04 Thread Greg Colvin
At 12:56 PM 1/4/2003, Aleksey Gurtovoy wrote: >Greg Colvin wrote: >> > If it was run-time C++, I would be happy with 'apply_tuple', >> > but in MPL domain "tuple" isn't really the right word, and I >> > don't like 'apply_seq' or, worse yet, 'apply_sequence'. Or >> > should it be 'seq_apply' (fro

[boost] possible error in documentation of call traits

2003-01-04 Thread Thorsten Ottosen
In note #3 it says that param_type requires partial specialization; however, it seems to work fine with vc7. Does it mean that param_type defaults to const T& if partial specialisation is not available? Thorsten Ottosen ___ Unsubscribe & other changes

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 plus > {

Re: [boost] [MPL] naming question

2003-01-04 Thread David Abrahams
Aleksey Gurtovoy <[EMAIL PROTECTED]> writes: > David Abrahams wrote: >> Aleksey Gurtovoy <[EMAIL PROTECTED]> writes: >> >> > >> > So, now the question is, how to name the adaptor? :) Does >> > 'unroll_args' sound right/good enough? >> >> Neat idea! How about "unary" or "unaryize"? > > I like th

RE: [boost] [MPL] naming question

2003-01-04 Thread Aleksey Gurtovoy
David Abrahams wrote: > Aleksey Gurtovoy <[EMAIL PROTECTED]> writes: > > > > > So, now the question is, how to name the adaptor? :) Does > > 'unroll_args' sound right/good enough? > > Neat idea! How about "unary" or "unaryize"? I like the latter, but it doesn't appear to be a word; "unarize" is

RE: [boost] [MPL] naming question

2003-01-04 Thread Aleksey Gurtovoy
Greg Colvin wrote: > > If it was run-time C++, I would be happy with 'apply_tuple', > > but in MPL domain "tuple" isn't really the right word, and I > > don't like 'apply_seq' or, worse yet, 'apply_sequence'. Or > > should it be 'seq_apply' (from an English language standpoint)? > > If this co

Re: [boost] [MPL] naming question

2003-01-04 Thread David Abrahams
Aleksey Gurtovoy <[EMAIL PROTECTED]> writes: > > So, now the question is, how to name the adaptor? :) Does 'unroll_args' > sound right/good enough? Neat idea! How about "unary" or "unaryize"? -- David Abrahams [EMAIL PROTECTED] * http://www.boost-consulting.com Boost s

RE: [boost] [MPL] naming question

2003-01-04 Thread Aleksey Gurtovoy
David Abrahams wrote: > > How would you call an 'apply' counterpart that takes a > > metafunction class and a _sequence_ of arguments, i.e.: > > > > typedef list_c args; > > typedef apply_tuple< plus<>, args >::type sum; // this one > > BOOST_STATIC_ASSERT(sum::value == 5); > > > > ? >

[boost] BGL: random_access_iterator_property_map missing?

2003-01-04 Thread Vladimir Prus
I was just going to use the class named in the subject. Unfortunately, it can't be found anywhere. Here what grep on an up-to-date CVS tree gives: boost/graph/detail/self_avoiding_walk.hpp: SAW_visitor< random_access_iterator_property_map, boost/graph/detail/self_avoiding_walk.hpp:HList,

Re: [boost] Re: filesystem feature request: file versioning

2003-01-04 Thread Beman Dawes
At 04:03 AM 1/3/2003, Daniel Yerushalmi wrote: >On the windows NTFS file system versioning can be simulated by multiple >data >stream per file (http://www.ntfs.com/ntfs-multiple.htm) (the file name is >:stream name). >You can save highest version number in a seperate stream that can be locked >du

Re: [boost] Filesystem Library mini-review

2003-01-04 Thread Beman Dawes
At 09:12 AM 12/18/2002, Peter Dimov wrote: >From: "Beman Dawes" <[EMAIL PROTECTED]> >> >> How about these member functions (in addition to what()): >> >> int native_error() const { return m_sys_err; } >> // Note: a value of 0 implies a library (rather than system) error >> >> e

Re: [boost] [MPL] naming question

2003-01-04 Thread Terje Slettebø
>From: "Terje Slettebø" <[EMAIL PROTECTED]> > >From: "Aleksey Gurtovoy" <[EMAIL PROTECTED]> > > > How would you call an 'apply' counterpart that takes a metafunction class > > and a _sequence_ of arguments, i.e.: > > > template<> > struct plus > { > template > struct apply { ... } > > templa

Re: [boost] [MPL] naming question

2003-01-04 Thread Terje Slettebø
>From: "Aleksey Gurtovoy" <[EMAIL PROTECTED]> > How would you call an 'apply' counterpart that takes a metafunction class > and a _sequence_ of arguments, i.e.: > > typedef list_c args; > typedef apply_tuple< plus<>, args >::type sum; // this one > BOOST_STATIC_ASSERT(sum::value == 5);

Re: [boost] is the link-fail test working correctly in theregression tests?

2003-01-04 Thread David Abrahams
"John Maddock" <[EMAIL PROTECTED]> writes: >> > the problem remains, if we have a "compile-fail" test, the failure >> > may be delayed until link time if the compiler does link-time >> > template instantiation. The reason we're not seeing this cropping >> > up in the current tests, is that the co

Re: [boost] [MPL] naming question

2003-01-04 Thread David Abrahams
Aleksey Gurtovoy <[EMAIL PROTECTED]> writes: > Hi all, > > How would you call an 'apply' counterpart that takes a metafunction class > and a _sequence_ of arguments, i.e.: > > typedef list_c args; > typedef apply_tuple< plus<>, args >::type sum; // this one > BOOST_STATIC_ASSERT(sum::v

Re: [boost] [MPL] naming question

2003-01-04 Thread Greg Colvin
At 02:54 AM 1/4/2003, you wrote: >Hi all, > >How would you call an 'apply' counterpart that takes a metafunction class >and a _sequence_ of arguments, i.e.: > >typedef list_c args; >typedef apply_tuple< plus<>, args >::type sum; // this one >BOOST_STATIC_ASSERT(sum::value == 5); > >? >

Re: [boost] is the link-fail test working correctly in the regressiontests?

2003-01-04 Thread John Maddock
> > the problem remains, if we have a "compile-fail" test, the failure > > may be delayed until link time if the compiler does link-time > > template instantiation. The reason we're not seeing this cropping > > up in the current tests, is that the compilers that were exhibiting > > that behaviour

[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_c 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 wit

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

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 m