| Home | Libraries | People | FAQ | More

## Function template operator<<

boost::units::operator<< — Print a `quantity`.

## Synopsis

    // In header: <boost/units/io.hpp>

    template<typename Char, typename Traits, typename Unit, typename T>
      std::basic_ostream< Char, Traits > &
      operator<<(std::basic_ostream< Char, Traits > & os,
                 const quantity< Unit, T > & q);

## Description

Prints the value followed by the unit. If the engineering_prefix, or binary_prefix is set, tries to scale the value appropriately. For example, it might print 12.345 km instead of 12345 m. (Note does not attempt to automatically scale scalars like double, float...)