Open cpetig opened 6 months ago
For passing as a reference std::vector<std::string> const&and std::vector<std::string_view> const& (and less so std::vector<std::string_view>) make sense.
std::vector<std::string> const&
std::vector<std::string_view> const&
std::vector<std::string_view>
Which one to choose? I tend towards the first.
This gets more prominent with resources!
But std::vector<std::string_view> is your only option if you don't have a vector already containing the objects.
this is exactly the purpose of the --ownership parameter for Rust
--ownership
For passing as a reference
std::vector<std::string> const&
andstd::vector<std::string_view> const&
(and less sostd::vector<std::string_view>
) make sense.Which one to choose? I tend towards the first.
This gets more prominent with resources!