Fix compile error "chosen constructor is explicit in copy-initialization"
This commit is contained in:
parent
98add63cdf
commit
8ea26fddfd
|
@ -46,7 +46,7 @@ enum class response_state {
|
|||
class response_impl {
|
||||
public:
|
||||
response_impl();
|
||||
void write_head(unsigned int status_code, header_map h = {});
|
||||
void write_head(unsigned int status_code, header_map h = header_map{});
|
||||
void end(std::string data = "");
|
||||
void end(generator_cb cb);
|
||||
void write_trailer(header_map h);
|
||||
|
@ -56,7 +56,7 @@ public:
|
|||
void cancel(uint32_t error_code);
|
||||
|
||||
response *push(boost::system::error_code &ec, std::string method,
|
||||
std::string raw_path_query, header_map h = {}) const;
|
||||
std::string raw_path_query, header_map) const;
|
||||
|
||||
boost::asio::io_service &io_service();
|
||||
|
||||
|
|
|
@ -156,7 +156,7 @@ public:
|
|||
// succeeds, or nullptr and |ec| contains error message.
|
||||
const request *submit(boost::system::error_code &ec,
|
||||
const std::string &method, const std::string &uri,
|
||||
header_map h = {}) const;
|
||||
header_map h = header_map{}) const;
|
||||
|
||||
// Submits request to server using |method| (e.g., "GET"), |uri|
|
||||
// (e.g., "http://localhost/") and optionally additional header
|
||||
|
@ -165,7 +165,7 @@ public:
|
|||
// contains error message.
|
||||
const request *submit(boost::system::error_code &ec,
|
||||
const std::string &method, const std::string &uri,
|
||||
std::string data, header_map h = {}) const;
|
||||
std::string data, header_map h = header_map{}) const;
|
||||
|
||||
// Submits request to server using |method| (e.g., "GET"), |uri|
|
||||
// (e.g., "http://localhost/") and optionally additional header
|
||||
|
@ -174,7 +174,7 @@ public:
|
|||
// nullptr and |ec| contains error message.
|
||||
const request *submit(boost::system::error_code &ec,
|
||||
const std::string &method, const std::string &uri,
|
||||
generator_cb cb, header_map h = {}) const;
|
||||
generator_cb cb, header_map h = header_map{}) const;
|
||||
|
||||
private:
|
||||
std::unique_ptr<session_impl> impl_;
|
||||
|
|
|
@ -71,7 +71,7 @@ public:
|
|||
|
||||
// Write response header using |status_code| (e.g., 200) and
|
||||
// additional header fields in |h|.
|
||||
void write_head(unsigned int status_code, header_map h = {}) const;
|
||||
void write_head(unsigned int status_code, header_map h = header_map{}) const;
|
||||
|
||||
// Sends |data| as request body. No further call of end() is
|
||||
// allowed.
|
||||
|
@ -103,7 +103,8 @@ public:
|
|||
// nullptr and error code is filled in |ec|. Be aware that the
|
||||
// header field name given in |h| must be lower-cased.
|
||||
const response *push(boost::system::error_code &ec, std::string method,
|
||||
std::string raw_path_query, header_map h = {}) const;
|
||||
std::string raw_path_query,
|
||||
header_map h = header_map{}) const;
|
||||
|
||||
// Returns status code.
|
||||
unsigned int status_code() const;
|
||||
|
|
Loading…
Reference in New Issue