Macaulay2 Engine
Loading...
Searching...
No Matches

◆ IM2_RingElement_promote()

const RingElement * IM2_RingElement_promote ( const Ring * S,
const RingElement * f )

Definition at line 396 of file ringelement.cpp.

397{
398 try
399 {
400 const RingElement *result;
401
402 if (f->promote(S, result)) return result;
403 ERROR("cannot promote given ring element");
404 return nullptr;
405 } catch (const exc::engine_error& e)
406 {
407 ERROR(e.what());
408 return nullptr;
409 }
410}
bool promote(const Ring *S, const RingElement *&result) const
Definition relem.cpp:305
Front-end-visible "ring element" value: an engine ring_elem paired with the Ring* that gives it meani...
Definition relem.hpp:67
const int ERROR
Definition m2-mem.cpp:55
VALGRIND_MAKE_MEM_DEFINED & result(result)

References ERROR, RingElement::promote(), and result().