Skip to content

Commit

Permalink
Change cxx standard to 17 (#53)
Browse files Browse the repository at this point in the history
Signed-off-by: sunby <sunbingyi1992@gmail.com>
  • Loading branch information
sunby authored Sep 11, 2023
1 parent 296fa9c commit 7a8c8ff
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ project(milvus-storage VERSION 0.1.0)
option(WITH_UT "Build the testing tree." ON)
option(WITH_ASAN "Build with address sanitizer." OFF)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

find_package(Boost REQUIRED)
Expand Down
1 change: 1 addition & 0 deletions cpp/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ def package_info(self):

self.cpp_info.components["libstorage"].requires = [
"boost::uuid",
"boost::algorithm",
]
if self.options.with_ut:
self.cpp_info.components["libstorage"].requires.append("gtest::gtest")
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/milvus-storage/file/delete_fragment.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class DeleteFragmentVisitor : public arrow::ArrayVisitor {
delete_set_.emplace(value, std::vector<int64_t>());
continue;
}
if (delete_set_.contains(value)) {
if (delete_set_.count(value) != 0) {
auto v = version_col_->Value(i);
delete_set_.at(value).push_back(version_col_->Value(i));
} else {
Expand Down
3 changes: 2 additions & 1 deletion cpp/src/common/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "common/constants.h"
#include "common/macro.h"
#include "arrow/filesystem/path_util.h"
#include "boost/algorithm/string/predicate.hpp"
#include <cstdlib>
namespace milvus_storage {

Expand Down Expand Up @@ -265,7 +266,7 @@ std::string GetNewBlobFilePath(const std::string& path) {

int64_t ParseVersionFromFileName(const std::string& path) {
auto pos = path.find(kManifestFileSuffix);
if (pos == std::string::npos || !path.ends_with(kManifestFileSuffix)) {
if (pos == std::string::npos || !boost::algorithm::ends_with(path, kManifestFileSuffix)) {
return -1;
}
auto version = path.substr(0, pos);
Expand Down

0 comments on commit 7a8c8ff

Please sign in to comment.