mirror of
https://github.com/OpenVPN/openvpn3.git
synced 2024-09-20 20:13:05 +02:00
4d9a751af2
Minor reorganization of unicode code.
28 lines
449 B
C++
28 lines
449 B
C++
//
|
|
// format.hpp
|
|
// OpenVPN
|
|
//
|
|
// Copyright (c) 2012 OpenVPN Technologies, Inc. All rights reserved.
|
|
//
|
|
|
|
#ifndef OPENVPN_COMMON_FORMAT_H
|
|
#define OPENVPN_COMMON_FORMAT_H
|
|
|
|
#include <string>
|
|
#include <sstream>
|
|
|
|
namespace openvpn {
|
|
|
|
// Convert an arbitrary argument to a string.
|
|
template <typename T>
|
|
std::string to_string(const T& value)
|
|
{
|
|
std::ostringstream os;
|
|
os << value;
|
|
return os.str();
|
|
}
|
|
|
|
} // namespace openvpn
|
|
|
|
#endif
|