diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-02-25 16:00:00 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-02-25 16:13:02 +0100 |
commit | df552ff53e68dff8ca360adbdbea214ece1d08ee (patch) | |
tree | 9ed3cb700377d4731b4c234ebec16efb0099c71a /src/libutil/fmt.hh | |
parent | 14b38d0887f8a8d6b75039113eface57cfb19d06 (diff) |
Remove std::string alias (for real this time)
Also use std::string_view in a few more places.
Diffstat (limited to 'src/libutil/fmt.hh')
-rw-r--r-- | src/libutil/fmt.hh | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libutil/fmt.hh b/src/libutil/fmt.hh index a7126fb65..0821b3b74 100644 --- a/src/libutil/fmt.hh +++ b/src/libutil/fmt.hh @@ -10,7 +10,6 @@ namespace nix { /* Inherit some names from other namespaces for convenience. */ -using std::string; using boost::format; @@ -21,8 +20,8 @@ struct nop { template<typename... T> nop(T...) {} }; struct FormatOrString { - string s; - FormatOrString(const string & s) : s(s) { }; + std::string s; + FormatOrString(std::string s) : s(std::move(s)) { }; template<class F> FormatOrString(const F & f) : s(f.str()) { }; FormatOrString(const char * s) : s(s) { }; @@ -102,7 +101,7 @@ std::ostream & operator<<(std::ostream & out, const normaltxt<T> & y) class hintformat { public: - hintformat(const string & format) : fmt(format) + hintformat(const std::string & format) : fmt(format) { fmt.exceptions(boost::io::all_error_bits ^ boost::io::too_many_args_bit ^ |