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

Unified Diff: net/quic/platform/impl/quic_str_cat_impl.h

Issue 2591143003: Add QuicStrCat. (Closed)
Patch Set: sync Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/platform/api/quic_str_cat_test.cc ('k') | net/tools/quic/end_to_end_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/platform/impl/quic_str_cat_impl.h
diff --git a/net/quic/platform/impl/quic_str_cat_impl.h b/net/quic/platform/impl/quic_str_cat_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..1989e8df5d5ba85437efd063c912e5988ea64ddd
--- /dev/null
+++ b/net/quic/platform/impl/quic_str_cat_impl.h
@@ -0,0 +1,23 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NET_QUIC_PLATFORM_IMPL_QUIC_STR_CAT_IMPL_H_
+#define NET_QUIC_PLATFORM_IMPL_QUIC_STR_CAT_IMPL_H_
+
+#include <sstream>
+#include <string>
+
+namespace net {
+
+template <typename... Args>
+inline std::string QuicStrCatImpl(const Args&... args) {
+ std::ostringstream oss;
+ int dummy[] = {1, (oss << args, 0)...};
+ static_cast<void>(dummy);
+ return oss.str();
+}
+
+} // namespace net
+
+#endif // NET_QUIC_PLATFORM_IMPL_QUIC_STR_CAT_IMPL_H_
« no previous file with comments | « net/quic/platform/api/quic_str_cat_test.cc ('k') | net/tools/quic/end_to_end_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698