Upgrade in-tree google benchmark to v1.1
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@286029 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#ifndef BENCHMARK_STRING_UTIL_H_
|
||||
#define BENCHMARK_STRING_UTIL_H_
|
||||
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include "internal_macros.h"
|
||||
|
||||
@@ -14,23 +14,19 @@ std::string HumanReadableNumber(double n);
|
||||
|
||||
std::string StringPrintF(const char* format, ...);
|
||||
|
||||
inline std::ostream&
|
||||
StringCatImp(std::ostream& out) BENCHMARK_NOEXCEPT
|
||||
{
|
||||
inline std::ostream& StringCatImp(std::ostream& out) BENCHMARK_NOEXCEPT {
|
||||
return out;
|
||||
}
|
||||
|
||||
template <class First, class ...Rest>
|
||||
inline std::ostream&
|
||||
StringCatImp(std::ostream& out, First&& f, Rest&&... rest)
|
||||
{
|
||||
template <class First, class... Rest>
|
||||
inline std::ostream& StringCatImp(std::ostream& out, First&& f,
|
||||
Rest&&... rest) {
|
||||
out << std::forward<First>(f);
|
||||
return StringCatImp(out, std::forward<Rest>(rest)...);
|
||||
}
|
||||
|
||||
template<class ...Args>
|
||||
inline std::string StrCat(Args&&... args)
|
||||
{
|
||||
template <class... Args>
|
||||
inline std::string StrCat(Args&&... args) {
|
||||
std::ostringstream ss;
|
||||
StringCatImp(ss, std::forward<Args>(args)...);
|
||||
return ss.str();
|
||||
@@ -39,6 +35,6 @@ inline std::string StrCat(Args&&... args)
|
||||
void ReplaceAll(std::string* str, const std::string& from,
|
||||
const std::string& to);
|
||||
|
||||
} // end namespace benchmark
|
||||
} // end namespace benchmark
|
||||
|
||||
#endif // BENCHMARK_STRING_UTIL_H_
|
||||
#endif // BENCHMARK_STRING_UTIL_H_
|
||||
|
||||
Reference in New Issue
Block a user