fail_quantity_non_unit.cpp 699 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // Boost.Units - A C++ library for zero-overhead dimensional analysis and
  2. // unit/quantity manipulation and conversion
  3. //
  4. // Copyright (C) 2008 Steven Watanabe
  5. //
  6. // Distributed under the Boost Software License, Version 1.0. (See
  7. // accompanying file LICENSE_1_0.txt or copy at
  8. // http://www.boost.org/LICENSE_1_0.txt)
  9. /**
  10. \file
  11. \brief fail_quantity_non_unit.cpp
  12. \details
  13. Make sure that trying to use a base_unit as though
  14. it were a unit fails.
  15. Output:
  16. @verbatim
  17. @endverbatim
  18. **/
  19. #include <boost/units/quantity.hpp>
  20. #include <boost/units/base_units/si/meter.hpp>
  21. namespace bu = boost::units;
  22. int main(int,char *[])
  23. {
  24. bu::quantity<bu::si::meter_base_unit> q;
  25. return 0;
  26. }