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 | /** |
11 | \file |
12 | |
13 | \brief fail_quantity_non_unit.cpp |
14 | |
15 | \details |
16 | |
17 | Make sure that trying to use a base_unit as though |
18 | it were a unit fails. |
19 | |
20 | Output: |
21 | @verbatim |
22 | @endverbatim |
23 | **/ |
24 | |
25 | #include <boost/units/quantity.hpp> |
26 | #include <boost/units/base_units/si/meter.hpp> |
27 | |
28 | namespace bu = boost::units; |
29 | |
30 | int main(int,char *[]) |
31 | { |
32 | |
33 | bu::quantity<bu::si::meter_base_unit> q; |
34 | |
35 | |
36 | return 0; |
37 | } |
38 | |