osrm-backend/include/server/http/header.hpp

29 lines
600 B
C++
Raw Normal View History

#ifndef HEADER_HPP
#define HEADER_HPP
#include <algorithm>
2016-05-27 15:05:04 -04:00
#include <string>
2013-12-16 05:29:38 -05:00
namespace osrm::server::http
2014-05-11 12:03:05 -04:00
{
2016-01-05 10:51:13 -05:00
struct header
{
// explicitly use default copy c'tor as adding move c'tor
header &operator=(const header &other) = default;
header(std::string name, std::string value) : name(std::move(name)), value(std::move(value)) {}
header(header &&other) : name(std::move(other.name)), value(std::move(other.value)) {}
void clear()
{
name.clear();
value.clear();
}
std::string name;
std::string value;
};
} // namespace osrm
#endif // HEADER_HPP