1 // test_math_fwd.cpp
2
3 // Copyright John Maddock 2010.
4 // Copyright Paul A. Bristow 2010.
5 // Use, modification and distribution are subject to the
6 // Boost Software License, Version 1.0. (See accompanying file
7 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8
9 // Basic sanity check that special functions forward declaration header
10 // <boost/math/special_functions/math_fwd.hpp>
11 // and distributions forward declarations header
12 // <boost/math/distributions/fwd.hpp>
13 // #includes all the files that it needs to.
14 //
15 #include <boost/math/special_functions/math_fwd.hpp>
16 #include <boost/math/special_functions/beta.hpp>
17 // using boost::math::beta;
18
19 #include <boost/math/distributions/fwd.hpp>
20 #include <boost/math/distributions/normal.hpp>
21 // using boost::math::normal_distribution;
22
main()23 int main()
24 {
25 // Special functions.
26 // Call functions, discarding any result.
27 using boost::math::beta;
28 beta(1.,2.);
29
30 // Distributions.
31 using boost::math::normal_distribution;
32 using boost::math::normal;
33
34 // Construct some distributions.
35 normal myf1(1., 2); // Using typedef.
36 normal n01; // Use default values for mean and standard deviation).
37 normal_distribution<> n01d(1., 2); // Using default RealType double.
38 normal_distribution<float> n01f; // Using float type, and defaults.
39 normal_distribution<float> myf22(0.f, 2.f); // Using explicit RealType float.
40
41 return 0;
42 }
43
44 /*
45
46 VS2010
47
48 ------ Build started: Project: test_math_fwd, Configuration: Debug Win32 ------
49 test_math_fwd.cpp
50 test_math_fwd.vcxproj -> J:\Cpp\MathToolkit\test\Math_test\Debug\test_math_fwd.exe
51 ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
52
53
54 ------ Build started: Project: test_math_fwd, Configuration: Release Win32 ------
55 test_math_fwd.cpp
56 Generating code
57 Finished generating code
58 test_math_fwd.vcxproj -> J:\Cpp\MathToolkit\test\Math_test\Release\test_math_fwd.exe
59
60 */
61
62
63