This is an automated email from the ASF dual-hosted git repository.

granthenke pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git


The following commit(s) were added to refs/heads/master by this push:
     new e0a439b  Explictly use boost::make_optional
e0a439b is described below

commit e0a439ba75e6ded0921b3da0c430fd8e1f7d5128
Author: Grant Henke <[email protected]>
AuthorDate: Mon Nov 23 11:37:32 2020 -0600

    Explictly use boost::make_optional
    
    This patch is in preparation for compilation with C++17. When compiling
    there are cases where `make_optional` is ambiguous because `make_optional`
    is also a part of `std::optional`. I fixed this by prefixing all existing 
usage of
    `make_optional` with `boost::`.
    
    Change-Id: I627fe57b42eb063dcb34057d0ea9f4847296bb8d
    Reviewed-on: http://gerrit.cloudera.org:8080/16772
    Tested-by: Kudu Jenkins
    Reviewed-by: Grant Henke <[email protected]>
---
 src/kudu/integration-tests/master_authz-itest.cc | 1 -
 src/kudu/integration-tests/master_hms-itest.cc   | 1 -
 src/kudu/master/catalog_manager.cc               | 9 ++++-----
 3 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/kudu/integration-tests/master_authz-itest.cc 
b/src/kudu/integration-tests/master_authz-itest.cc
index 41b6252..bbce5c1 100644
--- a/src/kudu/integration-tests/master_authz-itest.cc
+++ b/src/kudu/integration-tests/master_authz-itest.cc
@@ -55,7 +55,6 @@
 #include "kudu/util/test_macros.h"
 #include "kudu/util/test_util.h"
 
-using boost::make_optional;
 using boost::none;
 using boost::optional;
 using kudu::client::KuduClient;
diff --git a/src/kudu/integration-tests/master_hms-itest.cc 
b/src/kudu/integration-tests/master_hms-itest.cc
index 2efa9ec..621fea9 100644
--- a/src/kudu/integration-tests/master_hms-itest.cc
+++ b/src/kudu/integration-tests/master_hms-itest.cc
@@ -50,7 +50,6 @@
 #include "kudu/util/test_macros.h"
 #include "kudu/util/test_util.h"
 
-using boost::make_optional;
 using boost::none;
 using boost::optional;
 using kudu::client::KuduTable;
diff --git a/src/kudu/master/catalog_manager.cc 
b/src/kudu/master/catalog_manager.cc
index 4686933..e7211fb 100644
--- a/src/kudu/master/catalog_manager.cc
+++ b/src/kudu/master/catalog_manager.cc
@@ -351,7 +351,6 @@ GROUP_FLAG_VALIDATOR(auto_rebalancing_flags,
 
 using base::subtle::NoBarrier_CompareAndSwap;
 using base::subtle::NoBarrier_Load;
-using boost::make_optional;
 using boost::none;
 using boost::optional;
 using google::protobuf::Map;
@@ -1850,7 +1849,7 @@ Status CatalogManager::CreateTable(const 
CreateTableRequestPB* orig_req,
     }
   });
   const optional<string> dimension_label =
-      req.has_dimension_label() ? make_optional(req.dimension_label()) : none;
+      req.has_dimension_label() ? boost::make_optional(req.dimension_label()) 
: none;
   for (const Partition& partition : partitions) {
     PartitionPB partition_pb;
     partition.ToPB(&partition_pb);
@@ -2559,7 +2558,7 @@ Status CatalogManager::ApplyAlterPartitioningSteps(
 
           const optional<string> dimension_label =
               step.add_range_partition().has_dimension_label()
-              ? make_optional(step.add_range_partition().dimension_label())
+              ? 
boost::make_optional(step.add_range_partition().dimension_label())
               : none;
           PartitionPB partition_pb;
           partition.ToPB(&partition_pb);
@@ -4917,7 +4916,7 @@ void CatalogManager::HandleAssignCreatingTablet(const 
scoped_refptr<TabletInfo>&
   const PersistentTabletInfo& old_info = tablet->metadata().state();
 
   const optional<string> dimension_label = old_info.pb.has_dimension_label()
-      ? make_optional(old_info.pb.dimension_label())
+      ? boost::make_optional(old_info.pb.dimension_label())
       : none;
   // The "tablet creation" was already sent, but we didn't receive an answer
   // within the timeout. So the tablet will be replaced by a new one.
@@ -5239,7 +5238,7 @@ Status CatalogManager::BuildLocationsForTablet(
 
     const auto role = GetParticipantRole(peer, cstate);
     const optional<string> dimension = l_tablet.data().pb.has_dimension_label()
-        ? make_optional(l_tablet.data().pb.dimension_label())
+        ? boost::make_optional(l_tablet.data().pb.dimension_label())
         : none;
     if (ts_infos_dict) {
       const auto idx = ts_infos_dict->LookupOrAdd(peer.permanent_uuid(), 
fill_tsinfo_pb);

Reply via email to