Goose  binaryop.h at [75bcd81044]

File bs/llr/binaryop.h artifact 99140839cc part of check-in 75bcd81044


#ifndef EMPATHY_LLR_BINARYINSTR_H
#define EMPATHY_LLR_BINARYINSTR_H

namespace empathy::llr
{
    class BinaryOp
    {
        public:
            template< typename L, typename R >
            BinaryOp( L&& lhs, R&& rhs ) :
                m_lhs( forward< L >( lhs ) ),
                m_rhs( forward< R >( rhs ) )
            {}

            const auto& lhs() const { return m_lhs; }
            const auto& rhs() const { return m_rhs; }

            bool canBeExecuted() const;
            bool canBeEagerlyEvaluated() const;

        private:
            ir::Value m_lhs;
            ir::Value m_rhs;
    };
}

#endif