March 01, 2003
C++ Expression TemplatesListing 7: Wrapping variables into objects of type Variable
void someFunction (double x)
{
Variable v = x;
cout << ((v + 2) * 3).eval() << endl;
}
End of Listing
|
|
||||||||||||||||||||||||||||
|
|
|
|