Skip to content

Commit fe74e79

Browse files
authored
Merge pull request #1416 from boostorg/1412pt2
Check all of special functions can be included under same conditions
2 parents 188cccc + 9fbea69 commit fe74e79

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

test/Jamfile.v2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ test-suite special_fun :
203203
[ run git_issue_1247.cpp ]
204204
[ run git_issue_1308.cpp /boost/test//boost_unit_test_framework ]
205205
[ run git_issue_1412.cpp ]
206+
[ run git_issue_1412_pt_2.cpp ]
206207
[ run special_functions_test.cpp /boost/test//boost_unit_test_framework ]
207208
[ run test_airy.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ]
208209
[ run test_bessel_j.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ]

test/git_issue_1412_pt_2.cpp

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Copyright Matt Borland 2026
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+
// Regression test for https://github.com/boostorg/math/issues/1412
7+
//
8+
// Part 2: Test all of #include <boost/math/special_functions.hpp> as that is what libc++ is going to use
9+
10+
#define BOOST_MATH_NO_EXCEPTIONS
11+
12+
// Claim the <iomanip> include guard so any later #include <iomanip> expands to nothing and std::setprecision is unavailable.
13+
// The original reproducer with _SSTREAM broke <complex> which is outside our purview.
14+
#define _LIBCPP_IOMANIP // libc++
15+
#define _GLIBCXX_IOMANIP 1 // libstdc++
16+
17+
#include "compile_test/instantiate.hpp"
18+
19+
int main(int argc, char* [])
20+
{
21+
if (argc > 10000)
22+
{
23+
instantiate(double(0));
24+
instantiate_mixed(double(0));
25+
}
26+
}

0 commit comments

Comments
 (0)