#include #include "StatTools/Funct/FunctManip.h" #include "StatTools/Funct/FunctIO.h" struct Exponential { explicit Exponential( double ll ) : l( ll ) { } double operator()( double x ) const { return exp( l * x ); } double l; }; std::ostream& operator<<( std::ostream& cout, const Exponential& e ) { return cout << "exp( " << e.l << " x )"; } using namespace Funct; int main() { Exponential e1( 2 ); Exponential e2( 3 ); // verify no simplification occours std::cout << e1 / e2 << std::endl; return 0; }