Skip to content

Commit fd4c370

Browse files
committed
Replace boost conversion_traits with std::common_type
Signed-off-by: Brian McKinnon <brian.mckinnon@ubisoft.com>
1 parent 53044dc commit fd4c370

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

openvdb/openvdb/math/Math.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
#include <openvdb/Platform.h>
1212
#include <openvdb/version.h>
13-
#include <boost/numeric/conversion/conversion_traits.hpp>
1413
#include <algorithm> // for std::max()
1514
#include <cassert>
1615
#include <cmath> // for std::ceil(), std::fabs(), std::pow(), std::sqrt(), etc.
@@ -916,10 +915,9 @@ enum RotationOrder {
916915
ZXZ_ROTATION
917916
};
918917

919-
920-
template <typename S, typename T>
918+
template <typename S, typename T, typename = std::enable_if_t<std::is_arithmetic_v<S>&& std::is_arithmetic_v<T>>>
921919
struct promote {
922-
using type = typename boost::numeric::conversion_traits<S, T>::supertype;
920+
using type = typename std::common_type_t<S,T>;
923921
};
924922

925923
/// @brief Return the index [0,1,2] of the smallest value in a 3D vector.

0 commit comments

Comments
 (0)