mirror of
https://github.com/NixOS/nix
synced 2025-06-27 16:51:15 +02:00
dropEmptyInitThenConcatStringsSep -> concatStringSep: empty separator
When the separator is empty, no difference is observable. Note that concatStringsSep has centralized definitions. This adds the required definitions. Alternatively, `strings-inline.hh` could be included at call sites.
This commit is contained in:
parent
d40fdb5711
commit
97e01107ec
2 changed files with 10 additions and 1 deletions
|
@ -11,6 +11,8 @@
|
|||
#include <sstream>
|
||||
#include <optional>
|
||||
|
||||
#include "strings.hh"
|
||||
|
||||
namespace nix {
|
||||
|
||||
void initLibUtil();
|
||||
|
@ -69,7 +71,7 @@ auto concatStrings(Parts && ... parts)
|
|||
-> std::enable_if_t<(... && std::is_convertible_v<Parts, std::string_view>), std::string>
|
||||
{
|
||||
std::string_view views[sizeof...(parts)] = { parts... };
|
||||
return dropEmptyInitThenConcatStringsSep({}, views);
|
||||
return concatStringsSep({}, views);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue