Skip to content

Commit

Permalink
Fix compile errors under Clang 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
madmongo1 committed Jul 22, 2020
1 parent 6ddad79 commit 9a520f8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
* Fix compile errors under Clang 3.4
* Websocket SSL `teardown` also tears down underlying TCP.
* Update WebSocket examples to set TLS SNI.

Expand Down
6 changes: 3 additions & 3 deletions example/echo-op/echo_op.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,16 +355,16 @@ int main(int argc, char** argv)
}

namespace net = boost::asio;
auto const address{net::ip::make_address(argv[1])};
auto const port{static_cast<unsigned short>(std::atoi(argv[2]))};
auto const address = net::ip::make_address(argv[1]);
auto const port = static_cast<unsigned short>(std::atoi(argv[2]));

using endpoint_type = net::ip::tcp::endpoint;

// Create a listening socket, accept a connection, perform
// the echo, and then shut everything down and exit.
net::io_context ioc;
net::ip::tcp::acceptor acceptor{ioc};
endpoint_type ep{address, port};
endpoint_type ep(address, port);
acceptor.open(ep.protocol());
acceptor.set_option(net::socket_base::reuse_address(true));
acceptor.bind(ep);
Expand Down
3 changes: 2 additions & 1 deletion include/boost/beast/http/basic_parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ class basic_parser
{
boost::optional<std::uint64_t>
body_limit_ =
default_body_limit(is_request{}); // max payload body
boost::optional<std::uint64_t>(
default_body_limit(is_request{})); // max payload body
std::uint64_t len_ = 0; // size of chunk or body
std::uint64_t len0_ = 0; // content length if known
std::unique_ptr<char[]> buf_; // temp storage
Expand Down

0 comments on commit 9a520f8

Please sign in to comment.