Boost logo

Boost :

From: Maurizio Vitale (maurizio.vitale_at_[hidden])
Date: 2007-04-16 08:39:19

> Yes, I've noticed from the HEAD regressions for xpressive that
> Intel is
> not happy with proto. I don't have Intel at the moment so I can't
> debug.
> Patches welcome.
I'll try to see if I can understand what the problem is, at least in
this case
for which I have a short example which fails.

>> I hope Eric can find the time to review it and maybe add it to the
>> boost::proto
>> examples. I would certainly have benefited from something like
>> this being available.
>> On the other hand, I've learned more by doing it. Thanks to Eric for
>> having helped me and for making boost::proto available.
> <snip code>
> I have no comments about your use of proto -- it looks a lot like the
> lazy_vector example from the users' guide, in fact.

It is very similar indeed, and probably they can be merged. If you
remember, one of
my problems was were to put use defined data. In the lazy vector
example, terminals
are parametrized with a std::vector and that's where the wrapped data
The example I've sent makes, imo, more clear how to address the
simple use case
of using an udt with proto. In the end they are the same, but
understanding that
that's the case might require more understanding of proto than a
novice user
probably has.

> My only question is
> about why you want to use expression templates here at all. It's
> certainly not to avoid the cost of temporaries -- your number<> type
> holds nothing more than an int! Have I missed something?
Well, I'm trying to isolate the problems I'm facing in small
fragments of code.

I've sent you a larger piece, not using proto, and even that is only
part of what I need.
In the end I'll have integers and fixed-point numbers with different
precision (including
large and unbounded ones based on the GNU mp library). Removing
will be interesting for large numbers, but removing masking,
shifting, quantization
and overflow handling for intermediate expressions is where I need
expression templates.

So, yes, if all you need is implementing modular arithmetic like my
example, you don't need
expression templates.

> --
> Eric Niebler
> Boost Consulting
> _______________________________________________
> Unsubscribe & other changes:
> listinfo.cgi/boost

Boost list run by bdawes at, gregod at, cpdaniel at, john at