Skip to content

Commit d0bc5d7

Browse files
committed
Call clang-issue reproducer
Get coverage up for tests
1 parent b3b98ca commit d0bc5d7

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/boost_ci.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright (c) 2022 Alexander Grund
2+
// Copyright (c) 2022-2026 Alexander Grund
33
//
44
// Use, modification and distribution is subject to the Boost Software License,
55
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@@ -30,9 +30,11 @@ namespace boost
3030
{
3131
namespace boost_ci
3232
{
33+
void reproducer();
3334
// Some function to test
3435
int get_answer(const int isMsvc)
3536
{
37+
reproducer();
3638
boost::atomic<X> answer;
3739
// Specifically crafted condition to check for coverage from MSVC and non MSVC builds
3840
if(isMsvc == 1)
@@ -57,14 +59,16 @@ namespace boost
5759
void reproducer() {
5860
std::map<int, float> m{{0, 0.f}, {1, 1.f}};
5961

60-
// Bind a map element (value_type is pair<const string, float>).
62+
// Bind a map element (value_type is pair<const int, float>).
6163
auto bound = std::bind(f, *m.begin());
6264

6365
// The libstdc++ failure happens during instantiation of the defaulted move constructor of std::_Bind,
6466
// when it checks whether std::pair can be constructed from the internal tuple-like storage.
6567
auto bound2 = std::move(bound);
6668
(void)bound2;
6769
}
70+
#else
71+
void reproducer() {}
6872
#endif
6973
}
7074
}

0 commit comments

Comments
 (0)