On September 17, 2015 1:31:28 AM EDT, Robert Ramey
the following small example fails to compile and points to error in assignment. For the life of me I can't figure why this should fail. Any help appreciated.
Robert Ramey
// include headers to implement output operations for quantities with units #include <iostream> #include
#include
int main(){ boost::units::si::volume fuel_capacity; fuel_capacity = 9.0f * boost::units::si::cubic_meters; ------------------^ std::cout << " " << fuel_capacity << "\n"; return 0; }
It's because you are trying to assign a quantity to a dimension. quantity<volume> my_vol = 9f * cubic_meters; Or if your compiler has auto support. auto my_vol = 9f * cubic_meters; See the examples for clarification as well. HTH
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.