Change 'typedef' constructions to type aliases
This commit is contained in:
parent
a3d70bbcb5
commit
3ab6cd8a39
8 changed files with 11 additions and 11 deletions
|
|
@ -594,7 +594,7 @@ namespace SimpleWeb {
|
||||||
template <class socket_type>
|
template <class socket_type>
|
||||||
class Client : public ClientBase<socket_type> {};
|
class Client : public ClientBase<socket_type> {};
|
||||||
|
|
||||||
typedef asio::ip::tcp::socket HTTP;
|
using HTTP = asio::ip::tcp::socket;
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
class Client<HTTP> : public ClientBase<HTTP> {
|
class Client<HTTP> : public ClientBase<HTTP> {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace SimpleWeb {
|
namespace SimpleWeb {
|
||||||
typedef asio::ssl::stream<asio::ip::tcp::socket> HTTPS;
|
using HTTPS = asio::ssl::stream<asio::ip::tcp::socket>;
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
class Client<HTTPS> : public ClientBase<HTTPS> {
|
class Client<HTTPS> : public ClientBase<HTTPS> {
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,8 @@ using namespace std;
|
||||||
// Added for the json-example:
|
// Added for the json-example:
|
||||||
using namespace boost::property_tree;
|
using namespace boost::property_tree;
|
||||||
|
|
||||||
typedef SimpleWeb::Server<SimpleWeb::HTTP> HttpServer;
|
using HttpServer = SimpleWeb::Server<SimpleWeb::HTTP>;
|
||||||
typedef SimpleWeb::Client<SimpleWeb::HTTP> HttpClient;
|
using HttpClient = SimpleWeb::Client<SimpleWeb::HTTP>;
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// HTTP-server at port 8080 using 1 thread
|
// HTTP-server at port 8080 using 1 thread
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@ using namespace std;
|
||||||
// Added for the json-example:
|
// Added for the json-example:
|
||||||
using namespace boost::property_tree;
|
using namespace boost::property_tree;
|
||||||
|
|
||||||
typedef SimpleWeb::Server<SimpleWeb::HTTPS> HttpsServer;
|
using HttpsServer = SimpleWeb::Server<SimpleWeb::HTTPS>;
|
||||||
typedef SimpleWeb::Client<SimpleWeb::HTTPS> HttpsClient;
|
using HttpsClient = SimpleWeb::Client<SimpleWeb::HTTPS>;
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// HTTPS-server at port 8080 using 1 thread
|
// HTTPS-server at port 8080 using 1 thread
|
||||||
|
|
|
||||||
|
|
@ -551,7 +551,7 @@ namespace SimpleWeb {
|
||||||
template <class socket_type>
|
template <class socket_type>
|
||||||
class Server : public ServerBase<socket_type> {};
|
class Server : public ServerBase<socket_type> {};
|
||||||
|
|
||||||
typedef asio::ip::tcp::socket HTTP;
|
using HTTP = asio::ip::tcp::socket;
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
class Server<HTTP> : public ServerBase<HTTP> {
|
class Server<HTTP> : public ServerBase<HTTP> {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
#include <openssl/ssl.h>
|
#include <openssl/ssl.h>
|
||||||
|
|
||||||
namespace SimpleWeb {
|
namespace SimpleWeb {
|
||||||
typedef asio::ssl::stream<asio::ip::tcp::socket> HTTPS;
|
using HTTPS = asio::ssl::stream<asio::ip::tcp::socket>;
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
class Server<HTTPS> : public ServerBase<HTTPS> {
|
class Server<HTTPS> : public ServerBase<HTTPS> {
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@ using namespace std;
|
||||||
namespace asio = boost::asio;
|
namespace asio = boost::asio;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef SimpleWeb::Server<SimpleWeb::HTTP> HttpServer;
|
using HttpServer = SimpleWeb::Server<SimpleWeb::HTTP>;
|
||||||
typedef SimpleWeb::Client<SimpleWeb::HTTP> HttpClient;
|
using HttpClient = SimpleWeb::Client<SimpleWeb::HTTP>;
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
// Test ScopeRunner
|
// Test ScopeRunner
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ namespace SimpleWeb {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::unordered_multimap<std::string, std::string, CaseInsensitiveHash, CaseInsensitiveEqual> CaseInsensitiveMultimap;
|
using CaseInsensitiveMultimap = std::unordered_multimap<std::string, std::string, CaseInsensitiveHash, CaseInsensitiveEqual>;
|
||||||
|
|
||||||
/// Percent encoding and decoding
|
/// Percent encoding and decoding
|
||||||
class Percent {
|
class Percent {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue