#include <boost/units/quantity.hpp>#include <boost/units/systems/si.hpp>#include <boost/units/base_units/us/foot.hpp>using namespace boost::units;
class Test {public:// takes any unit of lengthtemplate<class System>void setX(quantity<unit<length_dimension,System> > const& x) {// explicit conversion to si::length = metersm_X = quantity<si::length>(x);}private:quantity<si::length> m_X;};