diff --git a/include/dwarfs/string_table.h b/include/dwarfs/string_table.h index c53a73e6..1fb4d4cc 100644 --- a/include/dwarfs/string_table.h +++ b/include/dwarfs/string_table.h @@ -23,12 +23,11 @@ #include #include +#include #include #include #include -#include - #include "dwarfs/gen-cpp2/metadata_layouts.h" namespace dwarfs { @@ -66,24 +65,24 @@ class string_table { size_t unpacked_size() const { return impl_->unpacked_size(); } static thrift::metadata::string_table - pack(folly::Range input, + pack(std::span input, pack_options const& options = pack_options()); static thrift::metadata::string_table - pack(folly::Range input, + pack(std::span input, pack_options const& options = pack_options()); static thrift::metadata::string_table pack(std::vector const& input, pack_options const& options = pack_options()) { - return pack(folly::Range(input.data(), input.size()), options); + return pack(std::span(input.data(), input.size()), options); } template static thrift::metadata::string_table pack(std::array const& input, pack_options const& options = pack_options()) { - return pack(folly::Range(input.data(), input.size()), options); + return pack(std::span(input.data(), input.size()), options); } class impl { @@ -99,7 +98,7 @@ class string_table { private: template static thrift::metadata::string_table - pack_generic(folly::Range input, pack_options const& options); + pack_generic(std::span input, pack_options const& options); std::unique_ptr impl_; }; diff --git a/src/dwarfs/string_table.cpp b/src/dwarfs/string_table.cpp index aa53d415..c9077dbe 100644 --- a/src/dwarfs/string_table.cpp +++ b/src/dwarfs/string_table.cpp @@ -185,7 +185,7 @@ string_table::string_table(logger& lgr, std::string_view name, template thrift::metadata::string_table -string_table::pack_generic(folly::Range input, +string_table::pack_generic(std::span input, pack_options const& options) { auto size = input.size(); bool pack_data = options.pack_data; @@ -296,13 +296,13 @@ string_table::pack_generic(folly::Range input, } thrift::metadata::string_table -string_table::pack(folly::Range input, +string_table::pack(std::span input, pack_options const& options) { return pack_generic(input, options); } thrift::metadata::string_table -string_table::pack(folly::Range input, +string_table::pack(std::span input, pack_options const& options) { return pack_generic(input, options); }