@@ -18,21 +18,21 @@ class VariantVisitorRate : public boost::static_visitor<boost::variant<int, std:
1818
1919 // / Overloads operator() to avoid operating on strings
2020 // / \throws MonitoringInternalException
21- boost::variant< int , std::string, double , int64_t > operator ()(const std::string& a, const std::string& b) const {
21+ double operator ()(const std::string& a, const std::string& b) const {
2222 throw MonitoringInternalException (" DerivedMetrics/VariantRateVisitor" , " Cannot operate on string values" );
2323 }
2424
2525 // / Calculates rate only when two arguments of the same type are passed
2626 // / \return calculated rate in Hz
2727 template <typename T>
28- boost::variant< int , std::string, double , int64_t > operator ()(const T& a, const T& b) const {
29- return ( 1000 *(a - b)) / timestampCount;
28+ double operator ()(const T& a, const T& b) const {
29+ return static_cast < double >(( 1000 *(a - b)) / timestampCount) ;
3030 }
3131
3232 // / If arguments have different type an exception is raised
3333 // / \throws MonitoringInternalException
3434 template <typename T, typename U>
35- boost::variant< int , std::string, double , int64_t > operator ()(const T& a, const U& b) const {
35+ double operator ()(const T& a, const U& b) const {
3636 throw MonitoringInternalException (" DerivedMetrics/VariantRateVisitor" , " Cannot operate on different types" );
3737 }
3838};
0 commit comments