Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Jul 2018 19:42:18 +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: r474295 - head/net/kea/files
Message-ID:  <201807091942.w69JgIKI014837@repo.freebsd.org>

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

Log:
  net/kea: unbreak with boost 1.68
  
  libdhcp++.cc:420:24: error: call to 'distance' is ambiguous
              num_defs = distance(range.first, range.second);
                         ^~~~~~~~
  libdhcp++.cc:428:24: error: call to 'distance' is ambiguous
              num_defs = distance(range.first, range.second);
                         ^~~~~~~~
  libdhcp++.cc:537:24: error: call to 'distance' is ambiguous
              num_defs = distance(range.first, range.second);
                         ^~~~~~~~
  libdhcp++.cc:545:24: error: call to 'distance' is ambiguous
              num_defs = distance(range.first, range.second);
                         ^~~~~~~~
  libdhcp++.cc:637:31: error: call to 'distance' is ambiguous
              size_t num_defs = distance(range.first, range.second);
                                ^~~~~~~~
  libdhcp++.cc:743:35: error: call to 'distance' is ambiguous
                  size_t num_defs = distance(range.first, range.second);
                                    ^~~~~~~~
  /usr/include/c++/v1/iterator:511:1: note: candidate function [with _InputIter = boost::multi_index::detail::hashed_index_iterator<boost::multi_index::detail::hashed_index_node<boost::multi_index::detail::hashed_index_node<boost::multi_index::detail::index_node_base<boost::shared_ptr<isc::dhcp::OptionDefinition>, std::__1::allocator<boost::shared_ptr<isc::dhcp::OptionDefinition> > >, boost::multi_index::detail::hashed_non_unique_tag>, boost::multi_index::detail::hashed_non_unique_tag>, boost::multi_index::detail::bucket_array<std::__1::allocator<boost::shared_ptr<isc::dhcp::OptionDefinition> > >, boost::multi_index::detail::hashed_index_global_iterator_tag>]
  distance(_InputIter __first, _InputIter __last)
  ^
  /usr/local/include/boost/iterator/distance.hpp:49:9: note: candidate function [with SinglePassIterator = boost::multi_index::detail::hashed_index_iterator<boost::multi_index::detail::hashed_index_node<boost::multi_index::detail::hashed_index_node<boost::multi_index::detail::index_node_base<boost::shared_ptr<isc::dhcp::OptionDefinition>, std::__1::allocator<boost::shared_ptr<isc::dhcp::OptionDefinition> > >, boost::multi_index::detail::hashed_non_unique_tag>, boost::multi_index::detail::hashed_non_unique_tag>, boost::multi_index::detail::bucket_array<std::__1::allocator<boost::shared_ptr<isc::dhcp::OptionDefinition> > >, boost::multi_index::detail::hashed_index_global_iterator_tag>]
          distance(SinglePassIterator first, SinglePassIterator last)
          ^
  
  PR:		229569

Added:
  head/net/kea/files/patch-src_lib_dhcp_libdhcp++.cc   (contents, props changed)

Added: head/net/kea/files/patch-src_lib_dhcp_libdhcp++.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/kea/files/patch-src_lib_dhcp_libdhcp++.cc	Mon Jul  9 19:42:18 2018	(r474295)
@@ -0,0 +1,83 @@
+After https://github.com/boostorg/range/commit/69409ed63a9e1 build fails:
+
+libdhcp++.cc:420:24: error: call to 'distance' is ambiguous
+            num_defs = distance(range.first, range.second);
+                       ^~~~~~~~
+libdhcp++.cc:428:24: error: call to 'distance' is ambiguous
+            num_defs = distance(range.first, range.second);
+                       ^~~~~~~~
+libdhcp++.cc:537:24: error: call to 'distance' is ambiguous
+            num_defs = distance(range.first, range.second);
+                       ^~~~~~~~
+libdhcp++.cc:545:24: error: call to 'distance' is ambiguous
+            num_defs = distance(range.first, range.second);
+                       ^~~~~~~~
+libdhcp++.cc:637:31: error: call to 'distance' is ambiguous
+            size_t num_defs = distance(range.first, range.second);
+                              ^~~~~~~~
+libdhcp++.cc:743:35: error: call to 'distance' is ambiguous
+                size_t num_defs = distance(range.first, range.second);
+                                  ^~~~~~~~
+/usr/include/c++/v1/iterator:511:1: note: candidate function [with _InputIter = boost::multi_index::detail::hashed_index_iterator<boost::multi_index::detail::hashed_index_node<boost::multi_index::detail::hashed_index_node<boost::multi_index::detail::index_node_base<boost::shared_ptr<isc::dhcp::OptionDefinition>, std::__1::allocator<boost::shared_ptr<isc::dhcp::OptionDefinition> > >, boost::multi_index::detail::hashed_non_unique_tag>, boost::multi_index::detail::hashed_non_unique_tag>, boost::multi_index::detail::bucket_array<std::__1::allocator<boost::shared_ptr<isc::dhcp::OptionDefinition> > >, boost::multi_index::detail::hashed_index_global_iterator_tag>]
+distance(_InputIter __first, _InputIter __last)
+^
+/usr/local/include/boost/iterator/distance.hpp:49:9: note: candidate function [with SinglePassIterator = boost::multi_index::detail::hashed_index_iterator<boost::multi_index::detail::hashed_index_node<boost::multi_index::detail::hashed_index_node<boost::multi_index::detail::index_node_base<boost::shared_ptr<isc::dhcp::OptionDefinition>, std::__1::allocator<boost::shared_ptr<isc::dhcp::OptionDefinition> > >, boost::multi_index::detail::hashed_non_unique_tag>, boost::multi_index::detail::hashed_non_unique_tag>, boost::multi_index::detail::bucket_array<std::__1::allocator<boost::shared_ptr<isc::dhcp::OptionDefinition> > >, boost::multi_index::detail::hashed_index_global_iterator_tag>]
+        distance(SinglePassIterator first, SinglePassIterator last)
+        ^
+
+--- src/lib/dhcp/libdhcp++.cc.orig	2017-10-05 13:00:05 UTC
++++ src/lib/dhcp/libdhcp++.cc
+@@ -417,7 +417,7 @@ size_t LibDHCP::unpackOptions6(const OptionBuffer& buf
+         size_t num_defs = 0;
+         if (option_space == DHCP6_OPTION_SPACE) {
+             range = idx.equal_range(opt_type);
+-            num_defs = distance(range.first, range.second);
++            num_defs = std::distance(range.first, range.second);
+         }
+ 
+         // Standard option definitions do not include the definition for
+@@ -425,7 +425,7 @@ size_t LibDHCP::unpackOptions6(const OptionBuffer& buf
+         // find the definition among runtime option definitions.
+         if (num_defs == 0) {
+             range = runtime_idx.equal_range(opt_type);
+-            num_defs = distance(range.first, range.second);
++            num_defs = std::distance(range.first, range.second);
+         }
+ 
+         OptionPtr opt;
+@@ -534,7 +534,7 @@ size_t LibDHCP::unpackOptions4(const OptionBuffer& buf
+         size_t num_defs = 0;
+         if (option_space == DHCP4_OPTION_SPACE) {
+             range = idx.equal_range(opt_type);
+-            num_defs = distance(range.first, range.second);
++            num_defs = std::distance(range.first, range.second);
+         }
+ 
+         // Standard option definitions do not include the definition for
+@@ -542,7 +542,7 @@ size_t LibDHCP::unpackOptions4(const OptionBuffer& buf
+         // find the definition among runtime option definitions.
+         if (num_defs == 0) {
+             range = runtime_idx.equal_range(opt_type);
+-            num_defs = distance(range.first, range.second);
++            num_defs = std::distance(range.first, range.second);
+         }
+ 
+         // Check if option unpacking must be deferred
+@@ -634,7 +634,7 @@ size_t LibDHCP::unpackVendorOptions6(const uint32_t ve
+                 idx->equal_range(opt_type);
+             // Get the number of returned option definitions for the
+             // option code.
+-            size_t num_defs = distance(range.first, range.second);
++            size_t num_defs = std::distance(range.first, range.second);
+ 
+             if (num_defs > 1) {
+                 // Multiple options of the same code are not supported
+@@ -740,7 +740,7 @@ size_t LibDHCP::unpackVendorOptions4(const uint32_t ve
+                     idx->equal_range(opt_type);
+                 // Get the number of returned option definitions for
+                 // the option code.
+-                size_t num_defs = distance(range.first, range.second);
++                size_t num_defs = std::distance(range.first, range.second);
+ 
+                 if (num_defs > 1) {
+                     // Multiple options of the same code are not



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