diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2018-07-09 19:42:28 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2018-07-09 19:42:28 +0000 |
commit | 0666a2501928da97765ab94b2624df38a51d9549 (patch) | |
tree | 79038f69365d7caab2b3033d65745257aecdaf5b | |
parent | net/kea: unbreak with boost 1.68 (diff) |
graphics/luxrender: unbreak with boost 1.68
accelerators/bvhaccel.cpp:149:19: error: call to 'distance' is ambiguous
u_int middle = distance(list.begin(), it);
^~~~~~~~
/usr/include/c++/v1/iterator:511:1: note: candidate function [with _InputIter = std::__1::__wrap_iter<boost::shared_ptr<lux::BVHAccelTreeNode> *>]
distance(_InputIter __first, _InputIter __last)
^
/usr/local/include/boost/iterator/distance.hpp:49:9: note: candidate function [with SinglePassIterator = std::__1::__wrap_iter<boost::shared_ptr<lux::BVHAccelTreeNode> *>]
distance(SinglePassIterator first, SinglePassIterator last)
^
PR: 229569
-rw-r--r-- | graphics/luxrender/files/patch-accelerators_bvhaccel.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/graphics/luxrender/files/patch-accelerators_bvhaccel.cpp b/graphics/luxrender/files/patch-accelerators_bvhaccel.cpp new file mode 100644 index 000000000000..9b351647ea1d --- /dev/null +++ b/graphics/luxrender/files/patch-accelerators_bvhaccel.cpp @@ -0,0 +1,23 @@ +After http://github.com/boostorg/range/commit/69409ed63a9e1 build fails: + +accelerators/bvhaccel.cpp:149:19: error: call to 'distance' is ambiguous + u_int middle = distance(list.begin(), it); + ^~~~~~~~ +/usr/include/c++/v1/iterator:511:1: note: candidate function [with _InputIter = std::__1::__wrap_iter<boost::shared_ptr<lux::BVHAccelTreeNode> *>] +distance(_InputIter __first, _InputIter __last) +^ +/usr/local/include/boost/iterator/distance.hpp:49:9: note: candidate function [with SinglePassIterator = std::__1::__wrap_iter<boost::shared_ptr<lux::BVHAccelTreeNode> *>] + distance(SinglePassIterator first, SinglePassIterator last) + ^ + +--- accelerators/bvhaccel.cpp.orig 2016-05-09 21:21:17 UTC ++++ accelerators/bvhaccel.cpp +@@ -146,7 +146,7 @@ boost::shared_ptr<BVHAccelTreeNode> BVHAccel::BuildHie + + vector<boost::shared_ptr<BVHAccelTreeNode> >::iterator it = + partition(list.begin()+splits[j], list.begin()+splits[j+1], bind2nd(ptr_fun(bvh_ltf[splitAxis]), splitValue)); +- u_int middle = distance(list.begin(), it); ++ u_int middle = std::distance(list.begin(), it); + middle = max(splits[j]+1, min(splits[j+1]-1, middle)); // Make sure coincidental BBs are still split + splits.insert(splits.begin()+j+1, middle); + } |