| 1 | // Boost.Units - A C++ library for zero-overhead dimensional analysis and |
|---|---|
| 2 | // unit/quantity manipulation and conversion |
| 3 | // |
| 4 | // Copyright (C) 2003-2008 Matthias Christian Schabel |
| 5 | // Copyright (C) 2008 Steven Watanabe |
| 6 | // |
| 7 | // Distributed under the Boost Software License, Version 1.0. (See |
| 8 | // accompanying file LICENSE_1_0.txt or copy at |
| 9 | // http://www.boost.org/LICENSE_1_0.txt) |
| 10 | |
| 11 | /** |
| 12 | \file |
| 13 | |
| 14 | \brief fail_implicit_conversion.cpp |
| 15 | |
| 16 | \details |
| 17 | Test implicit conversions for quantity. |
| 18 | |
| 19 | Output: |
| 20 | @verbatim |
| 21 | @endverbatim |
| 22 | **/ |
| 23 | |
| 24 | #include <boost/units/quantity.hpp> |
| 25 | #include <boost/units/systems/si.hpp> |
| 26 | #include <boost/units/systems/cgs.hpp> |
| 27 | |
| 28 | namespace bu = boost::units; |
| 29 | |
| 30 | int main(int,char *[]) |
| 31 | { |
| 32 | const bu::quantity<bu::si::length> T1(2.0 * bu::si::meters); |
| 33 | const bu::quantity<bu::cgs::length> T2 = T1; |
| 34 | |
| 35 | return 0; |
| 36 | } |
| 37 |
