
void setY(quantity<unit<???, System> > const& y) { m_Y = quantity<si::dimensionless>(y); }
I would like to be able to accept any systems dimensionless quantity. Since dimensionless isn't a physical system I obviously didn't find a tag I could use like length_dimension. What should I do here?
I'm getting the feeling that you're not trying very hard here... Look in the <boost/units> directory and you will find three headers : dimensionless_type.hpp, dimensionless_unit.hpp, and dimensionless_quantity.hpp, giving you a variety of options : template<class System,class Y> void setA(quantity<unit<dimensionless_type,System>,Y>&) { } template<class System,class Y> void setB(quantity<typename dimensionless_unit<System>::type,Y>&) { } template<class System,class Y> void setC(typename dimensionless_quantity<System,Y>::type&) { } Matthias