#include #include #include #include #include #include #include #include namespace myproject { namespace units { ///---------------------------- /// BASE UNITS ///---------------------------- struct minute_base_unit : public boost::units::base_unit { static std::string name() { return("minute"); } static std::string symbol() { return("min"); } }; namespace angle { struct radian_base_unit : public boost::units::base_unit { static std::string name() { return(""); } static std::string symbol() { return(""); } }; struct degree_base_unit : public boost::units::base_unit { static std::string name() { return(""); } static std::string symbol() { return(""); } }; } // namespace angle namespace earth { struct kilometer_base_unit : public boost::units::base_unit { static std::string name() { return("kilometer"); } static std::string symbol() { return("km"); } }; /// placeholder class defining astrodynamics unit system typedef boost::units::make_system < kilometer_base_unit, minute_base_unit, angle::degree_base_unit>::type system; /// dimensionless astrodynamics unit typedef boost::units::unit dimensionless; typedef boost::units::unit length; BOOST_UNITS_STATIC_CONSTANT(kilometer,length); BOOST_UNITS_STATIC_CONSTANT(km,length); }// namespace earth } } int main ( int, char** ) { using namespace myproject::units; boost::units::quantity val1 ( 3 * earth::kilometer ); std::cout << result << std::endl; return 0; }