From: Julian Andres Klode Date: Fri, 30 Oct 2015 13:44:52 +0000 (+0100) Subject: srvrec: Do not expose C++11 tuple use in header X-Git-Tag: 1.1_exp15~61 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/3129bd50d30dad985764436f147ad44bc54f2005 srvrec: Do not expose C++11 tuple use in header This makes non-C++11 reverse deps wishing to use it FTBFS. --- diff --git a/apt-pkg/contrib/srvrec.cc b/apt-pkg/contrib/srvrec.cc index 9af282653..be159bad9 100644 --- a/apt-pkg/contrib/srvrec.cc +++ b/apt-pkg/contrib/srvrec.cc @@ -16,6 +16,7 @@ #include #include +#include #include #include @@ -25,6 +26,12 @@ #include "srvrec.h" +bool SrvRec::operator==(SrvRec const &other) const +{ + return (std::tie(target, priority, weight, port) == + std::tie(other.target, other.priority, other.weight, other.port)); +} + bool GetSrvRecords(std::string host, int port, std::vector &Result) { std::string target; diff --git a/apt-pkg/contrib/srvrec.h b/apt-pkg/contrib/srvrec.h index 920b6bb32..01b810281 100644 --- a/apt-pkg/contrib/srvrec.h +++ b/apt-pkg/contrib/srvrec.h @@ -12,7 +12,6 @@ #include #include #include -#include class SrvRec { @@ -30,9 +29,7 @@ class SrvRec bool operator<(SrvRec const &other) const { return this->priority < other.priority; } - bool operator==(SrvRec const &other) const { - return std::tie(target, priority, weight, port) == std::tie(other.target, other.priority, other.weight, other.port); - } + bool operator==(SrvRec const &other) const; SrvRec(std::string const Target, u_int16_t const Priority, u_int16_t const Weight, u_int16_t const Port) :