I have the weirdest error ever, it claims that what I've wrote isn't an expression when it clearly is. Unless I'm making a stupid mistake and can't see it, any help would be greatly appreciated.
here is the code(please put aside the fact that some variables aren't referenced and stuff, they are in the original code):
Galik is correct; your definition of J_1 will definitely cause a problem. I'm curious - how did you try debugging this initially? Looking at the last line listed above alone, it would be very very difficult to spot the error, especially when you have macro expansion to consider. One of the most important skills I've gained in the workplace is the ability to effectively debug problems (without the help of the cplusplus.com community :)). In this case, you could try either:
1) unit testing all your macros
and/or
2) breaking out the expression into a series of smaller expressions, allowing the compiler to show you exactly where your problem is.
This would show you the error is in the initialization of v3, which you could then examine more closely.
Also as an aside - I don't know how others feel about this, but IMO having macros that rely on the existence of local variables of a particular name seems a bit sloppy...