Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2007-04-16 01:03:50

Maurizio Vitale wrote:
> This is a short example that I put together to show how to use boost::proto for
> modifying the semantics of C++ builtin datatypes.


> It fails miserably under the Intel C++ compiler 9.1.046, which is really really
> unhappy about the context being a template class. I haven't investigated further,
> but given the fact that the Intel compiler is EDG based I suspect there's something
> wrong either in my code or in boost::proto.

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 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. 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?

Eric Niebler
Boost Consulting

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