bool operator<(const QuestionIdentifier& rhs) const
{
return
- tie(d_id, d_qtype, d_source, d_dest, d_qname) <
- tie(rhs.d_id, rhs.d_qtype, rhs.d_source, rhs.d_dest, rhs.d_qname);
+ std::tie(d_id, d_qtype, d_source, d_dest, d_qname) <
+ std::tie(rhs.d_id, rhs.d_qtype, rhs.d_source, rhs.d_dest, rhs.d_qname);
}
#include "dns.hh"
#include <boost/version.hpp>
#include "namespaces.hh"
-using namespace ::boost::multi_index;
+#include <boost/multi_index_container.hpp>
+#include <boost/multi_index/ordered_index.hpp>
#include <boost/multi_index/hashed_index.hpp>
+#include <boost/multi_index/sequenced_index.hpp>
+#include <boost/multi_index/key_extractors.hpp>
+using namespace ::boost::multi_index;
#include "dnspacket.hh"
#include "lock.hh"
bool inserted;
cmap_t::iterator place;
- tie(place, inserted) = map->insert(val);
+ std::tie(place, inserted) = map->insert(val);
if (!inserted) {
map->replace(place, std::move(val));
bool AuthQueryCache::getEntryLocked(const cmap_t& map, const DNSName &qname, uint16_t qtype, vector<DNSZoneRecord>& value, int zoneID, time_t now)
{
auto& idx = boost::multi_index::get<HashTag>(map);
- auto iter = idx.find(tie(qname, qtype, zoneID));
+ auto iter = idx.find(std::tie(qname, qtype, zoneID));
if (iter == idx.end()) {
(*d_statnummiss)++;
#include "dns.hh"
#include <boost/version.hpp>
#include "namespaces.hh"
-using namespace ::boost::multi_index;
+#include <boost/multi_index_container.hpp>
+#include <boost/multi_index/ordered_index.hpp>
#include <boost/multi_index/hashed_index.hpp>
+#include <boost/multi_index/sequenced_index.hpp>
+#include <boost/multi_index/key_extractors.hpp>
+using namespace ::boost::multi_index;
#include "dns.hh"
#include "dnspacket.hh"
purgeLockedCollectionsVector(d_maps);
}
-void AuthZoneCache::replace(const vector<tuple<DNSName, int>>& zone_indices)
+void AuthZoneCache::replace(const vector<std::tuple<DNSName, int>>& zone_indices)
{
if (!d_refreshinterval)
return;
vector<cmap_t> newMaps(d_maps.size());
// build new maps
- for (const tuple<DNSName, int>& tup : zone_indices) {
- const DNSName& zone = tup.get<0>();
+ for (const std::tuple<DNSName, int>& tup : zone_indices) {
+ const DNSName& zone = std::get<0>(tup);
CacheValue val;
- val.zoneId = tup.get<1>();
+ val.zoneId = std::get<1>(tup);
auto& mc = newMaps[getMapIndex(zone)];
auto iter = mc.find(zone);
if (iter != mc.end()) {
// process zone updates done while data collection for replace() was already in progress.
auto pending = d_pending.lock();
assert(pending->d_replacePending); // make sure we never forget to call setReplacePending()
- for (const tuple<DNSName, int, bool>& tup : pending->d_pendingUpdates) {
- const DNSName& zone = tup.get<0>();
+ for (const std::tuple<DNSName, int, bool>& tup : pending->d_pendingUpdates) {
+ const DNSName& zone = std::get<0>(tup);
CacheValue val;
- val.zoneId = tup.get<1>();
- bool insert = tup.get<2>();
+ val.zoneId = std::get<1>(tup);
+ bool insert = std::get<2>(tup);
auto& mc = newMaps[getMapIndex(zone)];
auto iter = mc.find(zone);
if (iter != mc.end()) {
public:
AuthZoneCache(size_t mapsCount = 1024);
- void replace(const vector<tuple<DNSName, int>>& zone);
+ void replace(const vector<std::tuple<DNSName, int>>& zone);
void add(const DNSName& zone, const int zoneId);
void remove(const DNSName& zone);
void setReplacePending(); //!< call this when data collection for the subsequent replace() call starts.
struct PendingData
{
- std::vector<tuple<DNSName, int, bool>> d_pendingUpdates;
+ std::vector<std::tuple<DNSName, int, bool>> d_pendingUpdates;
bool d_replacePending{false};
};
LockGuarded<PendingData> d_pending;
std::pair<RequestPriority, uint64_t> priorityAndOrder;
bool operator<(const SuckRequest& b) const
{
- return tie(domain, master) < tie(b.domain, b.master);
+ return std::tie(domain, master) < std::tie(b.domain, b.master);
}
};
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#pragma once
-#include <boost/multi_index_container.hpp>
-#include <boost/multi_index/ordered_index.hpp>
-#include <boost/tuple/tuple_comparison.hpp>
-#include <boost/multi_index/key_extractors.hpp>
-#include <boost/multi_index/sequenced_index.hpp>
#include "qtype.hh"
#include "dnsname.hh"
#include <time.h>
{
auto data = d_data.lock();
- typedef nth_index<container_t,1>::type ordered_until;
- ordered_until& ou = get<1>(data->d_entries);
+ typedef boost::multi_index::nth_index<container_t,1>::type ordered_until;
+ ordered_until& ou = boost::multi_index::get<1>(data->d_entries);
for (ordered_until::iterator it = ou.begin(); it != ou.end(); ) {
if (it->d_until < now) {
#include <boost/multi_index_container.hpp>
#include <boost/multi_index/ordered_index.hpp>
+#include <boost/multi_index/member.hpp>
class DynBPFFilter
{
ComboAddress d_addr;
struct timespec d_until;
};
- typedef multi_index_container<BlockEntry,
- indexed_by <
- ordered_unique< member<BlockEntry,ComboAddress,&BlockEntry::d_addr>, ComboAddress::addressOnlyLessThan >,
- ordered_non_unique< member<BlockEntry,struct timespec,&BlockEntry::d_until> >
- >
- > container_t;
+ typedef boost::multi_index_container<BlockEntry,
+ boost::multi_index::indexed_by <
+ boost::multi_index::ordered_unique< boost::multi_index::member<BlockEntry,ComboAddress,&BlockEntry::d_addr>, ComboAddress::addressOnlyLessThan >,
+ boost::multi_index::ordered_non_unique< boost::multi_index::member<BlockEntry,struct timespec,&BlockEntry::d_until> >
+ >
+ > container_t;
struct Data {
container_t d_entries;
std::shared_ptr<BPFFilter> d_bpf{nullptr};
#include "dnsdist-web.hh"
#include "base64.hh"
-#include "dnswriter.hh"
#include "dolog.hh"
-#include "lock.hh"
#include "sodcrypto.hh"
#ifdef HAVE_LIBSSL
#endif
#include <boost/logic/tribool.hpp>
-#include <boost/lexical_cast.hpp>
+#include <boost/uuid/string_generator.hpp>
#ifdef HAVE_SYSTEMD
#include <systemd/sd-daemon.h>
}
if (vars.count("id")) {
- ret->setId(boost::lexical_cast<boost::uuids::uuid>(boost::get<string>(vars["id"])));
+ ret->setId(boost::uuids::string_generator()((boost::get<string>(vars["id"]))));
}
if (vars.count("checkName")) {
#endif
return result;
});
+
luaCtx.writeFunction("addDOHLocal", [client](const std::string& addr, boost::optional<boost::variant<std::string, std::shared_ptr<TLSCertKeyPair>, std::vector<std::pair<int, std::string>>, std::vector<std::pair<int, std::shared_ptr<TLSCertKeyPair>>>>> certFiles, boost::optional<boost::variant<std::string, std::vector<std::pair<int, std::string>>>> keyFiles, boost::optional<boost::variant<std::string, vector<pair<int, std::string>>>> urls, boost::optional<localbind_t> vars) {
if (client) {
return;
return servers[0].second;
}
- vector<pair<tuple<int,int,double>, size_t>> poss;
+ vector<pair<std::tuple<int,int,double>, size_t>> poss;
/* so you might wonder, why do we go through this trouble? The data on which we sort could change during the sort,
which would suck royally and could even lead to crashes. So first we snapshot on what we sort, and then we sort */
poss.reserve(servers.size());
size_t position = 0;
for(const auto& d : servers) {
if(d.second->isUp()) {
- poss.emplace_back(make_tuple(d.second->outstanding.load(), d.second->order, d.second->latencyUsec), position);
+ poss.emplace_back(std::make_tuple(d.second->outstanding.load(), d.second->order, d.second->latencyUsec), position);
}
++position;
}
*/
#pragma once
+#include <boost/multi_index_container.hpp>
+#include <boost/multi_index/ordered_index.hpp>
+#include <boost/multi_index/sequenced_index.hpp>
+#include <boost/multi_index/key_extractors.hpp>
+
#include "cachecleaner.hh"
#include "dnsdist.hh"
#include "dnsdist-ecs.hh"
#pragma once
+#include <boost/multi_index_container.hpp>
+#include <boost/multi_index/ordered_index.hpp>
+#include <boost/multi_index/sequenced_index.hpp>
+#include <boost/multi_index/key_extractors.hpp>
+
#include <queue>
#include "sstuff.hh"
// #include <netinet/in.h>
#include "misc.hh"
-#include <boost/tuple/tuple.hpp>
-#include <boost/tuple/tuple_comparison.hpp>
#include "dns.hh"
#include "dnswriter.hh"
#include "dnsname.hh"
bool operator<(const DNSRecord& rhs) const
{
- if(tie(d_name, d_type, d_class, d_ttl) < tie(rhs.d_name, rhs.d_type, rhs.d_class, rhs.d_ttl))
+ if(std::tie(d_name, d_type, d_class, d_ttl) < std::tie(rhs.d_name, rhs.d_type, rhs.d_class, rhs.d_ttl))
return true;
- if(tie(d_name, d_type, d_class, d_ttl) != tie(rhs.d_name, rhs.d_type, rhs.d_class, rhs.d_ttl))
+ if(std::tie(d_name, d_type, d_class, d_ttl) != std::tie(rhs.d_name, rhs.d_type, rhs.d_class, rhs.d_ttl))
return false;
string lzrp, rzrp;
if(b.d_name.canonCompare(a.d_name))
return false;
- if(tie(aType, a.d_class, a.d_ttl) < tie(bType, b.d_class, b.d_ttl))
+ if(std::tie(aType, a.d_class, a.d_ttl) < std::tie(bType, b.d_class, b.d_ttl))
return true;
- if(tie(aType, a.d_class, a.d_ttl) != tie(bType, b.d_class, b.d_ttl))
+ if(std::tie(aType, a.d_class, a.d_ttl) != std::tie(bType, b.d_class, b.d_ttl))
return false;
string lzrp, rzrp;
static bool rrsigncomp(const DNSZoneRecord& a, const DNSZoneRecord& b)
{
- return tie(a.dr.d_place, a.dr.d_type) < tie(b.dr.d_place, b.dr.d_type);
+ return std::tie(a.dr.d_place, a.dr.d_type) < std::tie(b.dr.d_place, b.dr.d_type);
}
static bool getBestAuthFromSet(const set<DNSName>& authSet, const DNSName& name, DNSName& auth)
#include "config.h"
#endif
#include <vector>
-#include <deque>
#include <iostream>
#include <boost/multi_index_container.hpp>
+#include <boost/multi_index/ordered_index.hpp>
+#include <boost/multi_index/key_extractors.hpp>
+
#include <boost/format.hpp>
#include <sys/time.h>
#include <time.h>
#include "misc.hh"
#include <netdb.h>
#include <sstream>
-#include <boost/tuple/tuple.hpp>
-#include <boost/tuple/tuple_comparison.hpp>
#include "namespaces.hh"
bool operator==(const ComboAddress& rhs) const
{
- if(boost::tie(sin4.sin_family, sin4.sin_port) != boost::tie(rhs.sin4.sin_family, rhs.sin4.sin_port))
+ if(std::tie(sin4.sin_family, sin4.sin_port) != std::tie(rhs.sin4.sin_family, rhs.sin4.sin_port))
return false;
if(sin4.sin_family == AF_INET)
return sin4.sin_addr.s_addr == rhs.sin4.sin_addr.s_addr;
if(sin4.sin_family == 0) {
return false;
}
- if(boost::tie(sin4.sin_family, sin4.sin_port) < boost::tie(rhs.sin4.sin_family, rhs.sin4.sin_port))
+ if(std::tie(sin4.sin_family, sin4.sin_port) < std::tie(rhs.sin4.sin_family, rhs.sin4.sin_port))
return true;
- if(boost::tie(sin4.sin_family, sin4.sin_port) > boost::tie(rhs.sin4.sin_family, rhs.sin4.sin_port))
+ if(std::tie(sin4.sin_family, sin4.sin_port) > std::tie(rhs.sin4.sin_family, rhs.sin4.sin_port))
return false;
if(sin4.sin_family == AF_INET)
bool operator==(const Netmask& rhs) const
{
- return tie(d_network, d_bits) == tie(rhs.d_network, rhs.d_bits);
+ return std::tie(d_network, d_bits) == std::tie(rhs.d_network, rhs.d_bits);
}
bool empty() const
bool operator==(const AddressAndPortRange& rhs) const
{
- return tie(d_addr, d_addrMask, d_portMask) == tie(rhs.d_addr, rhs.d_addrMask, rhs.d_portMask);
+ return std::tie(d_addr, d_addrMask, d_portMask) == std::tie(rhs.d_addr, rhs.d_addrMask, rhs.d_portMask);
}
bool operator<(const AddressAndPortRange& rhs) const
#pragma once
#include <sys/types.h>
+
#include <boost/multi_index_container.hpp>
+#include <boost/multi_index/key_extractors.hpp>
+#include <boost/multi_index/ordered_index.hpp>
+
#include "dnsparser.hh"
#include "dnsrecords.hh"
#include <regex.h>
#include <limits.h>
#include <type_traits>
-#include <boost/algorithm/string.hpp>
-#include <boost/multi_index_container.hpp>
-#include <boost/multi_index/ordered_index.hpp>
-#include <boost/tuple/tuple_comparison.hpp>
-#include <boost/multi_index/key_extractors.hpp>
-#include <boost/multi_index/sequenced_index.hpp>
-using namespace ::boost::multi_index;
+#include <boost/algorithm/string.hpp>
#include "dns.hh"
#include <atomic>
inline bool operator<(const struct timeval& lhs, const struct timeval& rhs)
{
- return tie(lhs.tv_sec, lhs.tv_usec) < tie(rhs.tv_sec, rhs.tv_usec);
+ return std::tie(lhs.tv_sec, lhs.tv_usec) < std::tie(rhs.tv_sec, rhs.tv_usec);
}
inline bool operator<=(const struct timeval& lhs, const struct timeval& rhs)
{
- return tie(lhs.tv_sec, lhs.tv_usec) <= tie(rhs.tv_sec, rhs.tv_usec);
+ return std::tie(lhs.tv_sec, lhs.tv_usec) <= std::tie(rhs.tv_sec, rhs.tv_usec);
}
inline bool operator<(const struct timespec& lhs, const struct timespec& rhs)
{
- return tie(lhs.tv_sec, lhs.tv_nsec) < tie(rhs.tv_sec, rhs.tv_nsec);
+ return std::tie(lhs.tv_sec, lhs.tv_nsec) < std::tie(rhs.tv_sec, rhs.tv_nsec);
}
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#pragma once
-#include <boost/function.hpp>
#include <boost/any.hpp>
-#include <boost/tuple/tuple.hpp>
-#include <boost/tuple/tuple_comparison.hpp>
#include <boost/multi_index_container.hpp>
#include <boost/multi_index/ordered_index.hpp>
#include <boost/multi_index/hashed_index.hpp>
{
public:
typedef boost::any funcparam_t;
- typedef boost::function<void(int, funcparam_t&)> callbackfunc_t;
+ typedef std::function<void(int, funcparam_t&)> callbackfunc_t;
enum class EventKind : uint8_t
{
Read,
std::vector<std::pair<int, funcparam_t>> getTimeouts(const struct timeval& tv, bool writes = false)
{
std::vector<std::pair<int, funcparam_t>> ret;
- const auto tied = boost::tie(tv.tv_sec, tv.tv_usec);
+ const auto tied = std::tie(tv.tv_sec, tv.tv_usec);
auto& idx = writes ? d_writeCallbacks.get<TTDOrderedTag>() : d_readCallbacks.get<TTDOrderedTag>();
for (auto it = idx.begin(); it != idx.end(); ++it) {
- if (it->d_ttd.tv_sec == 0 || tied <= boost::tie(it->d_ttd.tv_sec, it->d_ttd.tv_usec)) {
+ if (it->d_ttd.tv_sec == 0 || tied <= std::tie(it->d_ttd.tv_sec, it->d_ttd.tv_usec)) {
break;
}
ret.emplace_back(it->d_fd, it->d_parameter);
*/
#pragma once
-#include <boost/tuple/tuple.hpp>
#include <boost/format.hpp>
#include <boost/optional.hpp>
#include <iostream>
#include <string>
#include <vector>
-// We have a few paces where boost::tuple is used, and other places where an unscoped tuple is used
-// prefer the boost one for now. We might want to switch to std::tuple one day. Same for tie.
-using boost::make_tuple;
-using boost::tuple;
-using boost::tie;
-
using std::cerr;
using std::clog;
using std::cout;
{
*qhash = canHashPacket(queryPacket, s_skipOptions);
const auto& idx = d_packetCache.get<HashTag>();
- auto range = idx.equal_range(tie(tag, *qhash, tcp));
+ auto range = idx.equal_range(std::tie(tag, *qhash, tcp));
if (range.first == range.second) {
d_misses++;
{
*qhash = canHashPacket(queryPacket, s_skipOptions);
const auto& idx = d_packetCache.get<HashTag>();
- auto range = idx.equal_range(tie(tag, *qhash, tcp));
+ auto range = idx.equal_range(std::tie(tag, *qhash, tcp));
if (range.first == range.second) {
d_misses++;
void RecursorPacketCache::insertResponsePacket(unsigned int tag, uint32_t qhash, std::string&& query, const DNSName& qname, uint16_t qtype, uint16_t qclass, std::string&& responsePacket, time_t now, uint32_t ttl, const vState& valState, OptPBData&& pbdata, bool tcp)
{
auto& idx = d_packetCache.get<HashTag>();
- auto range = idx.equal_range(tie(tag, qhash, tcp));
+ auto range = idx.equal_range(std::tie(tag, qhash, tcp));
auto iter = range.first;
for (; iter != range.second; ++iter) {
#include <boost/multi_index/hashed_index.hpp>
#include <boost/tuple/tuple_comparison.hpp>
#include <boost/multi_index/sequenced_index.hpp>
+#include <boost/multi_index/key_extractors.hpp>
#include <boost/optional.hpp>
#include "packetcache.hh"
MemRecursorCache::cache_t::const_iterator MemRecursorCache::getEntryUsingECSIndex(MapCombo::LockedContent& map, time_t now, const DNSName& qname, const QType qtype, bool requireAuth, const ComboAddress& who)
{
// MUTEX SHOULD BE ACQUIRED (as indicated by the reference to the content which is protected by a lock)
- auto ecsIndexKey = tie(qname, qtype);
+ auto ecsIndexKey = std::tie(qname, qtype);
auto ecsIndex = map.d_ecsIndex.find(ecsIndexKey);
if (ecsIndex != map.d_ecsIndex.end() && !ecsIndex->isEmpty()) {
/* we have netmask-specific entries, let's see if we match one */
map.d_cachedqname = qname;
map.d_cachedrtag = rtag;
const auto& idx = map.d_map.get<NameAndRTagOnlyHashedTag>();
- map.d_cachecache = idx.equal_range(tie(qname, rtag));
+ map.d_cachecache = idx.equal_range(std::tie(qname, rtag));
map.d_cachecachevalid = true;
}
return map.d_cachecache;
}
else {
auto& ecsIdx = map->d_ecsIndex.get<HashedTag>();
- auto ecsIndexRange = ecsIdx.equal_range(tie(name, qtype));
+ auto ecsIndexRange = ecsIdx.equal_range(std::tie(name, qtype));
ecsIdx.erase(ecsIndexRange.first, ecsIndexRange.second);
}
}
{
auto& mc = getMap(name);
auto map = mc.lock();
- cache_t::iterator iter = map->d_map.find(tie(name, qtype));
+ cache_t::iterator iter = map->d_map.find(std::tie(name, qtype));
if (iter == map->d_map.end()) {
return false;
}
return;
}
- auto key = tie(entry.d_qname, entry.d_qtype);
+ auto key = std::tie(entry.d_qname, entry.d_qtype);
auto ecsIndexEntry = map.d_ecsIndex.find(key);
if (ecsIndexEntry != map.d_ecsIndex.end()) {
ecsIndexEntry->removeNetmask(entry.d_netmask);
#include <boost/multi_index/key_extractors.hpp>
#include <boost/multi_index/sequenced_index.hpp>
+using namespace ::boost::multi_index;
+
#include "base32.hh"
#include "dnsname.hh"
#include "dnsrecords.hh"
auto& map = getMap(lastLabel);
auto content = map.lock();
- negcache_t::const_iterator ni = content->d_map.find(tie(lastLabel, qtnull));
+ negcache_t::const_iterator ni = content->d_map.find(std::tie(lastLabel, qtnull));
while (ni != content->d_map.end() && ni->d_name == lastLabel && ni->d_auth.isRoot() && ni->d_qtype == qtnull) {
// We have something
{
auto& mc = getMap(qname);
auto map = mc.lock();
- auto range = map->d_map.equal_range(tie(qname, qtype));
+ auto range = map->d_map.equal_range(std::tie(qname, qtype));
if (range.first != range.second) {
range.first->d_validationState = newState;
{
auto& map = getMap(qname);
auto content = map.lock();
- return content->d_map.count(tie(qname));
+ return content->d_map.count(std::tie(qname));
}
/*!
{
auto& map = getMap(qname);
auto content = map.lock();
- return content->d_map.count(tie(qname, qtype));
+ return content->d_map.count(std::tie(qname, qtype));
}
/*!
if (subtree) {
for (auto& map : d_maps) {
auto m = map.lock();
- for (auto i = m->d_map.lower_bound(tie(name)); i != m->d_map.end();) {
+ for (auto i = m->d_map.lower_bound(std::tie(name)); i != m->d_map.end();) {
if (!i->d_name.isPartOf(name))
break;
i = m->d_map.erase(i);
auto& map = getMap(name);
auto content = map.lock();
- auto range = content->d_map.equal_range(tie(name));
+ auto range = content->d_map.equal_range(std::tie(name));
auto i = range.first;
while (i != range.second) {
i = content->d_map.erase(i);
#include <vector>
#include <boost/multi_index_container.hpp>
+#include <boost/multi_index/ordered_index.hpp>
#include <boost/multi_index/hashed_index.hpp>
+#include <boost/multi_index/sequenced_index.hpp>
+#include <boost/multi_index/key_extractors.hpp>
#include <boost/optional.hpp>
#include "dnsparser.hh"
#include "dnsname.hh"
void submit(const DNSName& domain, int rcode, unsigned int bytes, boost::optional<const ComboAddress&> remote);
Stat print(unsigned int depth=0, Stat newstat=Stat(), bool silent=false) const;
- typedef boost::function<void(const StatNode*, const Stat& selfstat, const Stat& childstat)> visitor_t;
+ typedef std::function<void(const StatNode*, const Stat& selfstat, const Stat& childstat)> visitor_t;
void visit(visitor_t visitor, Stat& newstat, unsigned int depth=0) const;
bool empty() const
{
records.clear();
// partial lookup
- std::pair<records_t::const_iterator,records_t::const_iterator> range = d_records.equal_range(tie(qname));
+ std::pair<records_t::const_iterator,records_t::const_iterator> range = d_records.equal_range(std::tie(qname));
SyncRes::AuthDomain::records_t::const_iterator ziter;
bool somedata = false;
QType type;
DNSResourceRecord::Place place;
bool operator<(const CacheKey& rhs) const {
- return tie(type, place, name) < tie(rhs.type, rhs.place, rhs.name);
+ return std::tie(type, place, name) < std::tie(rhs.type, rhs.place, rhs.name);
}
};
typedef map<CacheKey, CacheEntry> tcache_t;
uint8_t qtype;
bool operator<(const GetBestNSAnswer &b) const
{
- return boost::tie(qtype, qname, bestns) <
- boost::tie(b.qtype, b.qname, b.bestns);
+ return std::tie(qtype, qname, bestns) <
+ std::tie(b.qtype, b.qname, b.bestns);
}
};
{
bool operator()(const std::shared_ptr<PacketID>& a, const std::shared_ptr<PacketID>& b) const
{
- if (tie(a->remote, a->tcpsock, a->type) < tie(b->remote, b->tcpsock, b->type)) {
+ if (std::tie(a->remote, a->tcpsock, a->type) < std::tie(b->remote, b->tcpsock, b->type)) {
return true;
}
- if (tie(a->remote, a->tcpsock, a->type) > tie(b->remote, b->tcpsock, b->type)) {
+ if (std::tie(a->remote, a->tcpsock, a->type) > std::tie(b->remote, b->tcpsock, b->type)) {
return false;
}
- return tie(a->domain, a->fd, a->id) < tie(b->domain, b->fd, b->id);
+ return std::tie(a->domain, a->fd, a->id) < std::tie(b->domain, b->fd, b->id);
}
};
{
bool operator()(const std::shared_ptr<PacketID>& a, const std::shared_ptr<PacketID>& b) const
{
- if (tie(a->remote, a->tcpsock, a->type) < tie(b->remote, b->tcpsock, b->type)) {
+ if (std::tie(a->remote, a->tcpsock, a->type) < std::tie(b->remote, b->tcpsock, b->type)) {
return true;
}
- if (tie(a->remote, a->tcpsock, a->type) > tie(b->remote, b->tcpsock, b->type)) {
+ if (std::tie(a->remote, a->tcpsock, a->type) > std::tie(b->remote, b->tcpsock, b->type)) {
return false;
}
return a->domain < b->domain;
// Group records by name and type, signpipe stumbles over interrupted rrsets
if(securedZone && !presignedZone) {
sort(zrrs.begin(), zrrs.end(), [](const DNSZoneRecord& a, const DNSZoneRecord& b) {
- return tie(a.dr.d_name, a.dr.d_type) < tie(b.dr.d_name, b.dr.d_type);
+ return std::tie(a.dr.d_name, a.dr.d_type) < std::tie(b.dr.d_name, b.dr.d_type);
});
}
AuthZoneCache cache;
cache.setRefreshInterval(3600);
- vector<tuple<DNSName, int>> zone_indices{
+ vector<std::tuple<DNSName, int>> zone_indices{
{DNSName("example.org."), 1},
};
cache.setReplacePending();
AuthZoneCache cache;
cache.setRefreshInterval(3600);
- vector<tuple<DNSName, int>> zone_indices{
+ vector<std::tuple<DNSName, int>> zone_indices{
{DNSName("powerdns.org."), 1}};
cache.setReplacePending();
cache.add(DNSName("example.org."), 2);
AuthZoneCache cache;
cache.setRefreshInterval(3600);
- vector<tuple<DNSName, int>> zone_indices{
+ vector<std::tuple<DNSName, int>> zone_indices{
{DNSName("powerdns.org."), 1}};
cache.setReplacePending();
cache.remove(DNSName("powerdns.org."));
AuthZoneCache cache;
cache.setRefreshInterval(3600);
- vector<tuple<DNSName, int>> zone_indices{
+ vector<std::tuple<DNSName, int>> zone_indices{
{DNSName("powerdns.org."), 1},
{DNSName("example.org."), 2},
};
return;
}
- vector<tuple<DNSName, int>> zone_indices;
+ vector<std::tuple<DNSName, int>> zone_indices;
g_zoneCache.setReplacePending();
for (vector<DNSBackend*>::iterator i = backends.begin(); i != backends.end(); ++i )
di.backend->getDomainMetadataOne(zonename, "SOA-EDIT", soa_edit_kind);
bool soa_edit_done = false;
- set<tuple<DNSName, QType, string>> seen;
+ set<std::tuple<DNSName, QType, string>> seen;
for (const auto& rrset : rrsets.array_items()) {
string changetype = toUpper(stringFromJson(rrset, "changetype"));