This is an automated email from the ASF dual-hosted git repository. alexey pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kudu.git
commit 411c63f82805b442a1e14fe21cf5c438472578b2 Author: Volodymyr Verovkin <[email protected]> AuthorDate: Tue Apr 21 23:16:07 2020 -0700 [c++17] Corrected call of boost::make_optional() Without specifying "boost" namespace C++17 compiler treats make_optional() as std::make_optional() and produces error: ./../src/kudu/master/placement_policy-test.cc:1014:49: error: no viable conversion from 'optional<decay_t<std::__cxx11::basic_string<char> > >' (aka 'optional<std::__cxx11::basic_string<char> >') to 'const boost::optional<std::string>' (aka 'const optional<basic_string<char> >') ASSERT_OK(policy.PlaceTabletReplicas(3, make_optional(string(label)), &result)); Change-Id: I553ce8275508914cfa322a05fe2adfcd802372ad Reviewed-on: http://gerrit.cloudera.org:8080/15781 Tested-by: Kudu Jenkins Reviewed-by: Bankim Bhavsar <[email protected]> Reviewed-by: Alexey Serbin <[email protected]> --- src/kudu/master/placement_policy-test.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/kudu/master/placement_policy-test.cc b/src/kudu/master/placement_policy-test.cc index 7b076aa..90ea547 100644 --- a/src/kudu/master/placement_policy-test.cc +++ b/src/kudu/master/placement_policy-test.cc @@ -39,7 +39,6 @@ #include "kudu/util/status.h" #include "kudu/util/test_macros.h" -using boost::make_optional; using boost::none; using boost::optional; using std::initializer_list; @@ -1011,7 +1010,7 @@ TEST_F(PlacementPolicyTest, PlaceTabletReplicasWithNewTabletServers) { map<string, int> placement_stats; for (auto i = 0; i < 1000; ++i) { TSDescriptorVector result; - ASSERT_OK(policy.PlaceTabletReplicas(3, make_optional(string(label)), &result)); + ASSERT_OK(policy.PlaceTabletReplicas(3, boost::make_optional(string(label)), &result)); ASSERT_EQ(3, result.size()); for (const auto& ts : result) { const auto& ts_uuid = ts->permanent_uuid();
