Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Jul 2018 19:42:28 +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: r474296 - head/graphics/luxrender/files
Message-ID:  <201807091942.w69JgSOY018786@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Mon Jul  9 19:42:28 2018
New Revision: 474296
URL: https://svnweb.freebsd.org/changeset/ports/474296

Log:
  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

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

Added: head/graphics/luxrender/files/patch-accelerators_bvhaccel.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/luxrender/files/patch-accelerators_bvhaccel.cpp	Mon Jul  9 19:42:28 2018	(r474296)
@@ -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);
+ 		}



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