On Saturday, January 11, 2003, at 09:42 AM, Beman Dawes wrote:
>Or maybe even just:
>
> template
> struct my_container
> : if_::value, impl1, impl2>::type
> {
> ...
> };
These are the examples that resonate with me, particularly Howard's
version. It looks so easy, and has o
Howard Hinnant <[EMAIL PROTECTED]> writes:
> On Saturday, January 11, 2003, at 09:42 AM, Beman Dawes wrote:
>
>> >Or maybe even just:
>> >
>> > template
>> > struct my_container
>> > : if_::value, impl1, impl2>::type
>> > {
>> > ...
>> > };
>>
>> These are the examples that res
At 10:17 PM 1/6/2003, Howard Hinnant wrote:
>On Monday, January 6, 2003, at 06:50 PM, David Abrahams wrote:
>
>> OK, I see your point. How about:
>>
>> template
>> struct my_container
>> : if_<
>> and_<
>>is_pointer
>> , is_POD >
>>>
>>
Since I was fairly recently starting with MPL, I thought I would
chime in here.
If MPL had to be installed and configured, then I would be more
concerned with a Hello, World example. In my opinion, the point of
Hello, World type programs was just to verify that your toolchain was
set up properl
At 05:09 PM 1/6/2003, David B. Held wrote:
>"David Abrahams" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>> Howard Hinnant <[EMAIL PROTECTED]> writes:
>>
>> OK, I see your point. How about:
>>
>> template
>> struct my_container
>> : if_<
>>
"Yitzhak Sapir" <[EMAIL PROTECTED]> writes:
> The original version I suggested used fold, and for that, you do
> need to use if_ since you need to determine whether to call
> Prev::eval(). I didn't post my implementation since it took me
> quite a while to get it working with VC6.5 and I thought
> -Original Message-
> From: David B. Held [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 06, 2003 8:14 PM
> To: [EMAIL PROTECTED]
> Subject: [boost] Re: Hello MPL world!
>
> While this is a cute idea, my first impression would be: "Uh...is this
> reall
Howard Hinnant <[EMAIL PROTECTED]> writes:
> On Monday, January 6, 2003, at 06:50 PM, David Abrahams wrote:
>
> Or maybe even just:
>
>template
>struct my_container
> : if_::value, impl1, impl2>::type
^^^
you'd have to drop that part (yes, it's magic ).
>
- Original Message -
From: "Greg Colvin" <[EMAIL PROTECTED]>
> At 08:19 PM 1/6/2003, Joel de Guzman wrote:
> >- Original Message -
> >From: "David Abrahams" <[EMAIL PROTECTED]>
> >...
> >> > P.S. Outputting "Hello, world" in a way that generates significantly
> >> > more code th
At 08:19 PM 1/6/2003, Joel de Guzman wrote:
>- Original Message -
>From: "David Abrahams" <[EMAIL PROTECTED]>
>...
>> > P.S. Outputting "Hello, world" in a way that generates significantly
>> > more code than the run-time version is probably not a good way to
>> > endear users to metaprogr
- Original Message -
From: "David Abrahams" <[EMAIL PROTECTED]>
> "David B. Held" <[EMAIL PROTECTED]> writes:
>
> > "David Abrahams" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >> Yitzhak Sapir <[EMAIL PROTECTED]> writes:
> >>
> >> > I think s
On Monday, January 6, 2003, at 06:50 PM, David Abrahams wrote:
OK, I see your point. How about:
template
struct my_container
: if_<
and_<
is_pointer
, is_POD >
, impl1
, impl2
::type
{
...
};
Or maybe even just
"David Abrahams" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Howard Hinnant <[EMAIL PROTECTED]> writes:
>
> OK, I see your point. How about:
>
> template
> struct my_container
> : if_<
> and_<
>is_pointer
> ,
Howard Hinnant <[EMAIL PROTECTED]> writes:
> I would be careful that your target audience doesn't look at the
> "helloworld" and say, gee, why don't I just use existing language
> features:
>
>template
>struct my_container
>{
> // impl2 ...
>};
>
>template
>struct my
On Monday, January 6, 2003, at 01:14 PM, David B. Held wrote:
While this is a cute idea, my first impression would be: "Uh...is this
really something I could use in my own code?" On the other hand,
I seem to use compile-time if more than anything else, even in "user
code". I suspect that most
>From: "Alisdair Meredith" <[EMAIL PROTECTED]>
> Terje Slettebø wrote:
>
> > The results don't necessarily have to be printed out at
> > compile-time (Erwin Unruh printed the results using compiler-warnings,
but
> > that is of course highly implementation dependent).
>
> > "Hello, world" in compil
"David B. Held" <[EMAIL PROTECTED]> writes:
> "David Abrahams" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>> Yitzhak Sapir <[EMAIL PROTECTED]> writes:
>>
>> > I think storing the text "Hello world!" in a vector
>> > [...]
>> > And then using functors to pri
"David Abrahams" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Yitzhak Sapir <[EMAIL PROTECTED]> writes:
>
> > I think storing the text "Hello world!" in a vector
> > [...]
> > And then using functors to print it such as:
> [...]
While this is a cute idea, my
David Abrahams wrote:
> My current working idea is really simple:
>
> struct impl1 { ... };
> struct impl2 { ... };
>
> template
> struct my_container : if_, impl1, impl2>::type
> {
> ...
> };
>
> This is something I want to do all the time; it lets you swap out a
> completely
Alisdair Meredith <[EMAIL PROTECTED]> writes:
> Terje Slettebø wrote:
>
>> The results don't necessarily have to be printed out at
>> compile-time (Erwin Unruh printed the results using compiler-warnings, but
>> that is of course highly implementation dependent).
>
>> "Hello, world" in compile-tim
Terje Slettebø wrote:
> The results don't necessarily have to be printed out at
> compile-time (Erwin Unruh printed the results using compiler-warnings, but
> that is of course highly implementation dependent).
> "Hello, world" in compile-time programming doesn't necessarily have to be
> the same
21 matches
Mail list logo