Skip to content

Commit 72ae1e9

Browse files
committed
Allow implicit integer conversions for use with external libs
1 parent 9de5528 commit 72ae1e9

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

examples/statistics.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Distributed under the Boost Software License, Version 1.0.
33
// https://www.boost.org/LICENSE_1_0.txt
44

5+
// Needed for operations with boost math
6+
#define BOOST_DECIMAL_ALLOW_IMPLICIT_INTEGER_CONVERSIONS
7+
58
#include "where_file.hpp"
69
#include <boost/decimal.hpp>
710
#include <iostream>

test/test_boost_math_univariate_stats.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
// Propogates up from boost.math
1010
#define _SILENCE_CXX23_DENORM_DEPRECATION_WARNING
1111

12+
// Needed for operations with boost math
13+
#define BOOST_DECIMAL_ALLOW_IMPLICIT_INTEGER_CONVERSIONS
14+
1215
#include <boost/decimal.hpp>
1316

1417
#if defined(__clang__)

test/test_from_chars.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Distributed under the Boost Software License, Version 1.0.
33
// https://www.boost.org/LICENSE_1_0.txt
44

5+
// Needed for operations with boost math
6+
#define BOOST_DECIMAL_ALLOW_IMPLICIT_INTEGER_CONVERSIONS
7+
58
#include "mini_to_chars.hpp"
69
#include <boost/decimal.hpp>
710
#include <boost/charconv.hpp>

test/test_implicit_integral_conversion.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Distributed under the Boost Software License, Version 1.0.
33
// https://www.boost.org/LICENSE_1_0.txt
44

5+
// Needed for operations with boost math
6+
#define BOOST_DECIMAL_ALLOW_IMPLICIT_INTEGER_CONVERSIONS
7+
58
#include <boost/decimal.hpp>
69
#include <boost/core/lightweight_test.hpp>
710
#include <random>

0 commit comments

Comments
 (0)