]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/math/test/compile_test/sf_bernoulli_incl_test.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / math / test / compile_test / sf_bernoulli_incl_test.cpp
CommitLineData
7c673cae
FG
1// Copyright John Maddock 2012.
2// Use, modification and distribution are subject to the
3// Boost Software License, Version 1.0. (See accompanying file
4// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5//
6// Basic sanity check that header <boost/math/special_functions/bernoulli.hpp>
7// #includes all the files that it needs to.
8//
92f5a8d4 9#include <ostream>
7c673cae
FG
10#include <boost/math/special_functions/bernoulli.hpp>
11//
12// Note this header includes no other headers, this is
13// important if this test is to be meaningful:
14//
15#include "test_compile_result.hpp"
16
17void compile_and_link_test()
18{
19 check_result<float>(boost::math::bernoulli_b2n<float>(i));
20 check_result<double>(boost::math::bernoulli_b2n<double>(i));
21#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
22 check_result<long double>(boost::math::bernoulli_b2n<long double>(i));
23#endif
24
25 check_result<float>(boost::math::tangent_t2n<float>(i));
26 check_result<double>(boost::math::tangent_t2n<double>(i));
27#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
28 check_result<long double>(boost::math::tangent_t2n<long double>(i));
29#endif
11fdf7f2
TL
30#ifdef BOOST_MATH_HAVE_CONSTEXPR_TABLES
31 constexpr float ce_f = boost::math::unchecked_bernoulli_b2n<float>(2);
32 constexpr float ce_d = boost::math::unchecked_bernoulli_b2n<double>(2);
1e59de90 33#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
11fdf7f2 34 constexpr float ce_l = boost::math::unchecked_bernoulli_b2n<long double>(2);
92f5a8d4
TL
35 std::ostream cnull(0);
36 cnull << ce_f << ce_d << ce_l << std::endl;
11fdf7f2 37#endif
1e59de90 38#endif
7c673cae 39}