Use std::begin and std::end

This makes it clear that they are standard functions.
This commit is contained in:
Markus Mäkelä 2019-04-02 13:55:58 +03:00
parent 5242cd5ebf
commit cc1b8b2d56
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -182,13 +182,13 @@ template<class T>
std::string join(const T& container, const std::string& separator = ",")
{
std::stringstream ss;
auto it = begin(container);
auto it = std::begin(container);
if (it != end(container))
if (it != std::end(container))
{
ss << *it++;
while (it != end(container))
while (it != std::end(container))
{
ss << separator << *it++;
}