
Hello, I'm writing a complex number class using boost::proto by extending proto::terminal< boost::array<_, 2> >. I've attached a copy of my current code, which compiles, runs, and (at least with both g++ and icc on my machine) demonstrates a significant speed improvement compared to std::complex. However, there is (at least) one thing which don't work as it should: In the grammar I have to specify lazy_complex< double > instead of lazy_complex< _ >, otherwise the compiler cannot find proto's operator overloads, why? Note: This code will not compile under 1.37, but will compile under 1.40, because of some issue in 1.37 which manifests itself as a problem with the overloading of the '<<' operator. I've not tested the releases in between 1.37 and 1.40. General suggestions are also welcome. I'd like to get this cleaned up for general redistribution. Thank you in advance, Hal