
Hi, Sometimes it is difficult to make boost::units quantities with other libraries. For example to have boost::accumulators mean work with units, one has to specialize division by integer for quantities. In this example the accumulators and units compiles out of the box but gives an incorrect answer. #include<boost/accumulators/accumulators.hpp> #include <boost/accumulators/statistics/min.hpp> // or other stat features #include <boost/accumulators/statistics/max.hpp> // or other stat features #include<boost/units/systems/si.hpp> #include<boost/units/io.hpp> using namespace boost::accumulators; using namespace boost::units; int main(){ accumulator_set<quantity<si::time>, features<tag::min, tag::max> > a; a(2.1*si::second); a(2.0*si::second); a(4.1*si::second); std::cout << extract::min(a)<< " " << extract::max(a)<< std::endl ; return 0; } It prints: 0 s 4.1 s instead of: 2.1 s 4.1 s So, it seems that the min extractor fails for quantities. I would like to know if there is a way to correctly specialize "min" for quantities. (By the way, std::min for quantities works fine). However the behavior is unfortunate in the first place. Regardless of the solution I would label this as a bug of one of the two libraries. Thank you, Alfredo