Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
boost::units 是否可以选择以电子伏特 (eV) 表示能量?我似乎找不到合适的头文件
有点晚了,但你可以这样:
boost::units::quantity<boost::units::si::energy> electronvolt = 1. * boost::units::si::volt * boost::units::si::constants::codata::e;
(但是,这不是用户要问的:不,Boost.Units 不支持电子伏特)