Skip to content

Commit 996b297

Browse files
committed
Revert "Replace boost conversion_traits with std::common_type"
This reverts commit fd4c370. Signed-off-by: Dan Bailey <[email protected]>
1 parent b5bba2c commit 996b297

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

openvdb/openvdb/math/Math.h

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

1111
#include <openvdb/Platform.h>
1212
#include <openvdb/version.h>
13+
#include <boost/numeric/conversion/conversion_traits.hpp>
1314
#include <algorithm> // for std::max()
1415
#include <cassert>
1516
#include <cmath> // for std::ceil(), std::fabs(), std::pow(), std::sqrt(), etc.
@@ -915,9 +916,10 @@ enum RotationOrder {
915916
ZXZ_ROTATION
916917
};
917918

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

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

0 commit comments

Comments
 (0)