#ifndef CALCULATOR_CHALLENGE_OPERAND_HPP #define CALCULATOR_CHALLENGE_OPERAND_HPP #include #include #include template using BinaryOperatorType = std::function; using Operator = BinaryOperatorType; class IntegerOperand { public: explicit IntegerOperand(double value) noexcept : _value{value} {} auto get() const noexcept -> double { return _value; }; private: double _value{0}; }; class VariableOperand { public: explicit VariableOperand(std::string name) noexcept : _name{std::move(name)} {} auto get() const noexcept -> std::string { return _name; }; private: std::string _name; }; using Operand = std::variant; #endif