Less insane interface design for a trigger component for T types?
Having thought a little bit on the problem, I've come up with a solution I think satisfy my goal without being too awkward or introducing gotchas with raw pointers and ownership. Below is my updated code and as always, I would appreciate any feedback or tips on improvement.

  class IComparable
  {
  public:
    virtual ~IComparable() {}
    virtual bool lessOrEqual() const = 0;
    virtual bool greaterOrEqual() const = 0;
    virtual bool equal() const = 0;
    virtual bool lessThan() const = 0;
    virtual bool greaterThan() const = 0;
  };

  /* trigger/threshold set of any type supporting the comparison operators. Can create new set by adhering to the interface*/
  template&lt;class T&gt;
  class ComparableTriggerSet : public IComparable
  {
  public:
    ComparableTriggerSet(std::shared_ptr&lt;T&gt; threshold, const T&amp; trigger) : m_threshold(threshold), m_trigger(trigger) {}
    bool lessOrEqual() const { return m_trigger &lt;= *m_threshold; }
    bool greaterOrEqual() const { return m_trigger &gt;= *m_threshold; }
    bool equal() const { return m_trigger == *m_threshold; }
    bool lessThan() const { return m_trigger &lt; *m_threshold; }
    bool greaterThan() const { return m_trigger &gt; *m_threshold; }

  private:
    std::shared_ptr&lt;T&gt; m_threshold;
    const T&amp; m_trigger;
  };

  /* supported operators */
  enum CompareOperator { LessOrEqual, GreaterOrEqual, Equal, LessThan, GreaterThan };

  /* TriggerComponent - getting checked at regular intervals by the TriggerSystem */
  class TriggerComponent : public artemis::Component
  {
  public:
    TriggerComponent(std::shared_ptr&lt;IComparable&gt; comparableTriggerSet, CompareOperator compareOperator)
      : m_comparableTriggerSet(comparableTriggerSet), m_compareOperator(compareOperator) {}


    void check() const
    {
      bool condition = false;
      switch(m_compareOperator)
      {
        case LessOrEqual:
          condition = m_comparableTriggerSet-&gt;lessOrEqual();
          break;
        case GreaterOrEqual:
          condition = m_comparableTriggerSet-&gt;greaterOrEqual();
          break;
        case Equal:
          condition = m_comparableTriggerSet-&gt;equal();
          break;
        case LessThan:
          condition = m_comparableTriggerSet-&gt;lessThan();
          break;
        case GreaterThan:
          condition = m_comparableTriggerSet-&gt;greaterThan();
          break;
        default:
          assert(false &amp;&amp; "unsupported operator enum");
          break;
      }

      if(condition)
        execute();
    }

    /* supposed to invoke an event or maybe call a script or something similar */
    void execute() const
    {
      qDebug() &lt;&lt; "execute!";
    }

  private:
    std::shared_ptr&lt;IComparable&gt; m_comparableTriggerSet;
    CompareOperator m_compareOperator;
  };


I would then add the component in my executable like so:

  artemis::Entity&amp; ent = /* omitted */
  ScaleComponent* scaleComp = /* omitted */
  std::shared_ptr&lt;float&gt; threshold = std::make_shared&lt;float&gt;(1.0f);
  std::shared_ptr&lt;ComparableTriggerSet&lt;float&gt;&gt; triggerSet = std::make_shared&lt;ComparableTriggerSet&lt;float&gt;&gt;(threshold, scaleComp-&gt;getx());
  ent.addComponent(new TriggerComponent(triggerSet , CompareOperator::LessThan));


I think the updated code solves my original issues fairly well. I have thus far not encountered any problems with it, and I can add TriggerComponents without worry of whether threshold value is getting off the stack, cleaned up properly etc.