Boost logo

Proto :

Subject: [proto] Proto Transform Questions
From: Nate Knight (Nate.Knight_at_[hidden])
Date: 2011-01-14 14:29:25


I've pasted some code below where I am trying to transform expressions of the form

(a op b op c)[i]

to

(a[i] op b[i] op c[i])

I managed to get this to work for the simple case

(a+b)[i]

but I'm curious about how to generalize this to include other operators (without explicitly handling them all). Also, as written the transform doesn't recurse properly, and I'm having some trouble seeing how to correct this.

As I'm really just trying to get my mind around how proto works, any comments would be appreciated.

Thanks
Nate Knight





Proto list run by eric at boostpro.com