Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(553)

Side by Side Diff: third_party/google_benchmark/src/string_util.h

Issue 2865663003: Adding Google benchmarking library. (Closed)
Patch Set: Sketch. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 #ifndef BENCHMARK_STRING_UTIL_H_
2 #define BENCHMARK_STRING_UTIL_H_
3
4 #include <sstream>
5 #include <string>
6 #include <utility>
7 #include "internal_macros.h"
8
9 namespace benchmark {
10
11 void AppendHumanReadable(int n, std::string* str);
12
13 std::string HumanReadableNumber(double n);
14
15 std::string StringPrintF(const char* format, ...);
16
17 inline std::ostream& StringCatImp(std::ostream& out) BENCHMARK_NOEXCEPT {
18 return out;
19 }
20
21 template <class First, class... Rest>
22 inline std::ostream& StringCatImp(std::ostream& out, First&& f,
23 Rest&&... rest) {
24 out << std::forward<First>(f);
25 return StringCatImp(out, std::forward<Rest>(rest)...);
26 }
27
28 template <class... Args>
29 inline std::string StrCat(Args&&... args) {
30 std::ostringstream ss;
31 StringCatImp(ss, std::forward<Args>(args)...);
32 return ss.str();
33 }
34
35 void ReplaceAll(std::string* str, const std::string& from,
36 const std::string& to);
37
38 } // end namespace benchmark
39
40 #endif // BENCHMARK_STRING_UTIL_H_
OLDNEW
« no previous file with comments | « third_party/google_benchmark/src/stat.h ('k') | third_party/google_benchmark/src/string_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698