1 #ifndef CPPAD_CG_UNARY_INCLUDED 2 #define CPPAD_CG_UNARY_INCLUDED 22 inline CG<Base> CG<Base>::operator+()
const {
23 return CG<Base> (*this);
27 inline CG<Base> CG<Base>::operator-()
const {
29 return CG<Base> (-getValue());
32 CodeHandler<Base>& h = *getCodeHandler();
33 CG<Base> result(*h.makeNode(CGOpCode::UnMinus, this->argument()));
34 if (isValueDefined()) {
35 result.setValue(-getValue());