There are no default argument promotions on arguments that have _DecimalT class templates when the called function does not include a prototype. Any function definition containing _DecimalT class template arguments must be prototyped; otherwise, the compiler issues an error.
The following figure provides an example.
Figure 312. Example of Passing a _DecimalT Class Template Object to a Function
|
The output is:
+--------------------------------------------------------------------------------+ |x1 = 33.3 | |x2 = 55555.55555 | |x3 = 999.99000 | |x4 = 88888888888888888888888888888 | +--------------------------------------------------------------------------------+
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.