diff --git a/beast/http/rfc2616.h b/beast/http/rfc2616.h index fc697b8050..e446542c79 100644 --- a/beast/http/rfc2616.h +++ b/beast/http/rfc2616.h @@ -20,11 +20,12 @@ #ifndef BEAST_HTTP_RFC2616_H_INCLUDED #define BEAST_HTTP_RFC2616_H_INCLUDED +#include #include #include +#include #include #include -#include namespace beast { @@ -130,8 +131,8 @@ trim (String const& s) { using std::begin; using std::end; - auto first (begin(s)); - auto last (end(s)); + auto first = begin(s); + auto last = end(s); std::tie (first, last) = trim (first, last); return { first, last }; } diff --git a/beast/module/core/text/LexicalCast.h b/beast/module/core/text/LexicalCast.h index 52b122001a..f0d55ec89b 100644 --- a/beast/module/core/text/LexicalCast.h +++ b/beast/module/core/text/LexicalCast.h @@ -21,15 +21,16 @@ #define BEAST_LEXICALCAST_H_INCLUDED #include -#include // #include #include #include +#include +#include #include #include -#include +#include // #include -#include +#include namespace beast { @@ -169,14 +170,14 @@ struct LexicalCast std::enable_if_t ::value, bool> operator () (Integral& out, std::string const& in) const { - return parseUnsigned (out, std::begin(in), std::end(in)); + return parseUnsigned (out, in.begin(), in.end()); } template std::enable_if_t ::value, bool> operator () (Integral& out, std::string const& in) const { - return parseSigned (out, std::begin(in), std::end(in)); + return parseSigned (out, in.begin(), in.end()); } bool diff --git a/beast/utility/ci_char_traits.h b/beast/utility/ci_char_traits.h index 406302369e..056e08c9b8 100644 --- a/beast/utility/ci_char_traits.h +++ b/beast/utility/ci_char_traits.h @@ -23,6 +23,7 @@ #include // #include // #include +#include #include #include @@ -37,9 +38,11 @@ struct ci_less bool operator() (String const& lhs, String const& rhs) const { - typedef typename String::value_type char_type; - return std::lexicographical_compare (std::begin(lhs), std::end(lhs), - std::begin(rhs), std::end(rhs), + using std::begin; + using std::end; + using char_type = typename String::value_type; + return std::lexicographical_compare ( + begin(lhs), end(lhs), begin(rhs), end(rhs), [] (char_type lhs, char_type rhs) { return std::tolower(lhs) < std::tolower(rhs); @@ -54,7 +57,9 @@ std::enable_if_t::value && std::is_same::value, bool> ci_equal(Lhs const& lhs, Rhs const& rhs) { - return std::equal (lhs.begin(), lhs.end(), rhs.begin(), rhs.end(), + using std::begin; + using std::end; + return std::equal (begin(lhs), end(lhs), begin(rhs), end(rhs), [] (char lhs, char rhs) { return std::tolower(lhs) == std::tolower(rhs);