Boost logo

Boost Users :

Subject: [Boost-users] [Proto] automaitcally convert class to proto literal
From: Daniel Oberhoff (danieloberhoff_at_[hidden])
Date: 2009-01-04 06:39:06


Hi,

I am stilly trying o get my array computation DSEL up and running. The
basic grammar is in place, what I am fighting with is protfying my
literals. I.e. I have an array class, and I want the following
expression:

A(_i,_j)

to become a function(literal<Array>(A), index_placeholder<0>,
index_placeholder<1>)

(simplified for readability, but the point should be clear).

it works like this:

proto::lit(A)(_i,_j)

so how can I automate the turning of my array instance into a literal?
I have access to the class definition and I tried subclassing terminal
and literal and the PROTO_EXTENDS macro. The former two had no effect
on my problem, and the latter didn't compile ( I tried various
combindations of Expr and Derived parameters).

Any ideas?

Daniel


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net