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:
>> >
>> >
>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
> 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
"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
> > 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
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
>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
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
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
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
> {
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
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
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
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
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);
> >
> > ?
>
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,
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
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
>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
>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);
"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
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
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);
>
>?
>
> > 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
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
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
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
27 matches
Mail list logo