Skip to content

Commit

Permalink
Merge pull request AcademySoftwareFoundation#1688 from bpmckinnon/Rep…
Browse files Browse the repository at this point in the history
…laceBoostConversionTraits

Replace boost conversion_traits with std::common_type
  • Loading branch information
Idclip authored Oct 24, 2023
2 parents 70145ae + fd4c370 commit b227321
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions openvdb/openvdb/math/Math.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#include <openvdb/Platform.h>
#include <openvdb/version.h>
#include <boost/numeric/conversion/conversion_traits.hpp>
#include <algorithm> // for std::max()
#include <cassert>
#include <cmath> // for std::ceil(), std::fabs(), std::pow(), std::sqrt(), etc.
Expand Down Expand Up @@ -916,10 +915,9 @@ enum RotationOrder {
ZXZ_ROTATION
};


template <typename S, typename T>
template <typename S, typename T, typename = std::enable_if_t<std::is_arithmetic_v<S>&& std::is_arithmetic_v<T>>>
struct promote {
using type = typename boost::numeric::conversion_traits<S, T>::supertype;
using type = typename std::common_type_t<S,T>;
};

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

0 comments on commit b227321

Please sign in to comment.