Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef NET_QUIC_PLATFORM_IMPL_QUIC_STR_CAT_IMPL_H_ | |
| 6 #define NET_QUIC_PLATFORM_IMPL_QUIC_STR_CAT_IMPL_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 namespace net { | |
| 11 | |
| 12 template <typename... Args> | |
| 13 inline std::string QuicStrCatImpl(const Args&... args) { | |
| 14 std::ostringstream oss; | |
|
Ryan Hamilton
2016/12/22 18:17:30
nit: I suspect you need to #include something here
| |
| 15 int dummy[] = {1, (oss << args, 0)...}; | |
| 16 static_cast<void>(dummy); | |
| 17 return oss.str(); | |
| 18 } | |
| 19 | |
| 20 } // namespace net | |
| 21 | |
| 22 #endif // NET_QUIC_PLATFORM_IMPL_QUIC_STR_CAT_IMPL_H_ | |
| OLD | NEW |