Chromium Code Reviews| 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..e774ac46f999712eaa283e44bf6e1df1f9e47cfb |
| --- /dev/null |
| +++ b/net/quic/platform/impl/quic_str_cat_impl.h |
| @@ -0,0 +1,22 @@ |
| +// 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 <string> |
| + |
| +namespace net { |
| + |
| +template <typename... Args> |
| +inline std::string QuicStrCatImpl(const Args&... args) { |
| + std::ostringstream oss; |
|
Ryan Hamilton
2016/12/22 18:17:30
nit: I suspect you need to #include something here
|
| + 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_ |