Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Jul 2018 23:15:01 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r474653 - head/graphics/luxrender14/files
Message-ID:  <201807142315.w6ENF1pf030032@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Sat Jul 14 23:15:00 2018
New Revision: 474653
URL: https://svnweb.freebsd.org/changeset/ports/474653

Log:
  graphics/luxrender14: 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
  Reported by:	antoine (via exp-run)

Added:
  head/graphics/luxrender14/files/patch-accelerators_bvhaccel.cpp   (contents, props changed)

Added: head/graphics/luxrender14/files/patch-accelerators_bvhaccel.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/luxrender14/files/patch-accelerators_bvhaccel.cpp	Sat Jul 14 23:15:00 2018	(r474653)
@@ -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	2015-01-20 23:10:10 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);
+ 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807142315.w6ENF1pf030032>